"if not os.path.exists(directory)", not "if not os.path.exists('directory')"
This commit is contained in:
parent
b0bfb766d9
commit
d0e3a5341e
@ -165,7 +165,7 @@ class BasicFileStorage(StorageInterface):
|
|||||||
# Make directories if necessary
|
# Make directories if necessary
|
||||||
if len(filepath) > 1:
|
if len(filepath) > 1:
|
||||||
directory = self._resolve_filepath(filepath[:-1])
|
directory = self._resolve_filepath(filepath[:-1])
|
||||||
if not os.path.exists('directory'):
|
if not os.path.exists(directory):
|
||||||
os.makedirs(directory)
|
os.makedirs(directory)
|
||||||
|
|
||||||
# Grab and return the file in the mode specified
|
# Grab and return the file in the mode specified
|
||||||
|
Loading…
x
Reference in New Issue
Block a user