diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-01-26 13:28:44 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-01-26 13:34:40 +0100 |
| commit | cebbec9b6122579a32a019a0449d4995dcf2191d (patch) | |
| tree | 7481cc37ec642a44e76393b427c230730788522d | |
| parent | 424eb67867162032d92e0bfe3403f051765de805 (diff) | |
Fixed #19540 -- Stopped using deprecated os.stat_float_times.
| -rw-r--r-- | django/contrib/staticfiles/management/commands/collectstatic.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/django/contrib/staticfiles/management/commands/collectstatic.py b/django/contrib/staticfiles/management/commands/collectstatic.py index edf8c62dd2..6116f31efc 100644 --- a/django/contrib/staticfiles/management/commands/collectstatic.py +++ b/django/contrib/staticfiles/management/commands/collectstatic.py @@ -60,9 +60,6 @@ class Command(NoArgsCommand): self.local = False else: self.local = True - # Use ints for file times (ticket #14665), if supported - if hasattr(os, 'stat_float_times'): - os.stat_float_times(False) def set_options(self, **options): """ @@ -231,7 +228,9 @@ Type 'yes' to continue, or 'no' to cancel: """ else: full_path = None # Skip the file if the source file is younger - if target_last_modified >= source_last_modified: + # Avoid sub-second precision (see #14665, #19540) + if (target_last_modified.replace(microsecond=0) + >= source_last_modified.replace(microsecond=0)): if not ((self.symlink and full_path and not os.path.islink(full_path)) or (not self.symlink and full_path |
