Fixed #23986 -- Fixed collectstatic --clear failure if STATIC_ROOT dir doesn't exist.

This commit is contained in:
Sztrovacsek 2015-03-07 14:15:26 +01:00 committed by Tim Graham
parent 90b069c33f
commit 87d78241a2
2 changed files with 7 additions and 0 deletions

View file

@ -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)