Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download setup.ini only if server copy is newer #33

Closed
maphew opened this issue Mar 30, 2015 · 2 comments
Closed

Download setup.ini only if server copy is newer #33

maphew opened this issue Mar 30, 2015 · 2 comments

Comments

@maphew
Copy link
Owner

maphew commented Mar 30, 2015

No description provided.

@maphew
Copy link
Owner Author

maphew commented Mar 30, 2015

Although implemented specifically for saving downloads of setup.ini, it's generalized so also applies to package downloads. Previously we just relied on hash md5 changes for deciding on whether to download or not. (Ideally, we should also be relying on hash check of setup.ini. I don't think that's implemented upstream either though(?) If not, that should be done too.)

The new functions:

 + url_time_to_dateime: Convert "last-modified" web server header to a python datetime object
 + datetime_to_unixtime: Convert a datetime object to unix UTC time

... are not robust, and likely susceptible to differences in locale syntax. I [asked SO for an idiomatic approach][0], but no solutions yet. I've spent about 8 hours on these few lines; date and time is hard! I'll be very surprised if there no bugs in this change set.

[0] http://stackoverflow.com/questions/29314287/python-requests-download-only-if-newer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant