summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry13
1 files changed, 9 insertions, 4 deletions
diff --git a/lorry b/lorry
index c3c6208..2a55969 100755
--- a/lorry
+++ b/lorry
@@ -241,10 +241,15 @@ class Lorry(cliapp.Application):
def process_args(self, args):
status = 0
-
- self.settings['working-area'] = os.path.abspath(self.settings['working-area'])
- if not os.path.exists(self.settings['working-area']):
- os.makedirs(self.settings['working-area'])
+
+ def ensure_path_exists(setting_name):
+ full_path = os.path.abspath(self.settings[setting_name])
+ if not os.path.exists(full_path):
+ os.makedirs(full_path)
+ self.settings[setting_name] = full_path
+
+ ensure_path_exists('working-area')
+ ensure_path_exists('tarball-dest')
urllib.request.install_opener(
urllib.request.build_opener(SimpleFTPHandler))