"if not os.path.exists(directory)", not "if not os.path.exists('directory')"

This commit is contained in:
Christopher Allan Webber 2011-04-16 10:59:23 -05:00
parent b0bfb766d9
commit d0e3a5341e

View File

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