diff options
| author | Sztrovacsek <hanna.kollo@gmail.com> | 2015-03-07 14:15:26 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-03-07 10:47:07 -0500 |
| commit | 87d78241a2fc85e5715fb51c554fe06e91deee58 (patch) | |
| tree | 3fcf021dd97584ae53ce95c5d5cefa7f3c72083d /django | |
| parent | 90b069c33f3f8785a7d068a2032f130d2dbb0c75 (diff) | |
Fixed #23986 -- Fixed collectstatic --clear failure if STATIC_ROOT dir doesn't exist.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/staticfiles/management/commands/collectstatic.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/staticfiles/management/commands/collectstatic.py b/django/contrib/staticfiles/management/commands/collectstatic.py index 1ed7127f96..0c3f4e15fd 100644 --- a/django/contrib/staticfiles/management/commands/collectstatic.py +++ b/django/contrib/staticfiles/management/commands/collectstatic.py @@ -199,6 +199,9 @@ class Command(BaseCommand): """ Deletes the given relative path using the destination storage backend. """ + if not self.storage.exists(path): + return + dirs, files = self.storage.listdir(path) for f in files: fpath = os.path.join(path, f) |
