1
0
mirror of https://github.com/django/django.git synced 2025-04-08 23:46:43 +00:00

Fixed -- Removed unneeded AttributeError catching in collectstatic's delete_file().

This commit is contained in:
Peter Ruszel 2024-10-28 15:37:10 -07:00 committed by Ryan Cheley
parent d8e3c73ec2
commit 6c8427cb65

@ -279,14 +279,14 @@ class Command(BaseCommand):
try:
# When was the target file modified last time?
target_last_modified = self.storage.get_modified_time(prefixed_path)
except (OSError, NotImplementedError, AttributeError):
except (OSError, NotImplementedError):
# The storage doesn't support get_modified_time() or failed
pass
else:
try:
# When was the source file modified last time?
source_last_modified = source_storage.get_modified_time(path)
except (OSError, NotImplementedError, AttributeError):
except (OSError, NotImplementedError):
pass
else:
# The full path of the target file