Added code to set the PSL file's last modified time to reflect time of last download.
π Motivation and context
PSL should only be downloaded once per day. The current code attempts to enforce that by only downloading a new PSL, when the local copy is older than 24 hours:
stat.st_mtime checks the last modified date of the local PSL, however, the last modified date will often be 2-4 days ago even if the PSL was downloaded minutes before.
Resolves #132.
π§ͺ Testing
I ran Trustymail against an array of domains.
The first domain was tested and then the code waited for a local PSL to be created before testing the remaining domains. I logged all STDOUT to see if the "PSL Updated" message appeared more than once.
β Pre-approval checklist
[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] All relevant type-of-change labels have been added.
π£ Description
Added code to set the PSL file's last modified time to reflect time of last download.
π Motivation and context
PSL should only be downloaded once per day. The current code attempts to enforce that by only downloading a new PSL, when the local copy is older than 24 hours:
stat.st_mtime checks the last modified date of the local PSL, however, the last modified date will often be 2-4 days ago even if the PSL was downloaded minutes before.
Resolves #132.
π§ͺ Testing
I ran Trustymail against an array of domains. The first domain was tested and then the code waited for a local PSL to be created before testing the remaining domains. I logged all STDOUT to see if the "PSL Updated" message appeared more than once.
β Pre-approval checklist
β Pre-merge checklist
β Post-merge checklist