Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #19540 -- Stopped using deprecated os.stat_float_times.

  • Loading branch information...
commit cebbec9b6122579a32a019a0449d4995dcf2191d 1 parent 424eb67
@aaugustin aaugustin authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 django/contrib/staticfiles/management/commands/collectstatic.py
View
7 django/contrib/staticfiles/management/commands/collectstatic.py
@@ -60,9 +60,6 @@ def __init__(self, *args, **kwargs):
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 @@ def delete_file(self, path, prefixed_path, source_storage):
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
Please sign in to comment.
Something went wrong with that request. Please try again.