From 6c8427cb654ea1e619d046c0cbb6d540c12c04a6 Mon Sep 17 00:00:00 2001 From: Peter Ruszel <3279147+pruszel@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:37:10 -0700 Subject: [PATCH] Fixed #35868 -- Removed unneeded AttributeError catching in collectstatic's delete_file(). --- .../contrib/staticfiles/management/commands/collectstatic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/staticfiles/management/commands/collectstatic.py b/django/contrib/staticfiles/management/commands/collectstatic.py index c346038df8..d5cd3f56ca 100644 --- a/django/contrib/staticfiles/management/commands/collectstatic.py +++ b/django/contrib/staticfiles/management/commands/collectstatic.py @@ -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