Fix indentation: fix indentation
@@ -100,16 +100,16 @@ class RequirementPreparer(object):
@property
def _download_should_save(self):
# type: () -> bool
- # TODO: Modify to reduce indentation needed
- if self.download_dir:
+ if not self.download_dir:
+ return False
+
if os.path.exists(self.download_dir):
return True
- else:
+
logger.critical('Could not find download directory')
raise InstallationError(
"Could not find or access download directory '%s'"
% display_path(self.download_dir))
- return False
def prepare_linked_requirement(
self,
