summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorAdnan Ali <adnan.ali@codethink.co.uk>2012-02-20 11:07:15 +0000
committerAdnan Ali <adnan.ali@codethink.co.uk>2012-02-20 11:07:15 +0000
commit825c6c4eb2b534303211ff05a06a90242f6044de (patch)
tree9daf1e8dfbdbcbe450dff5dc9391cb89f28a1ce3 /lorry
parentf879ddd5a35c185b867a6b66adb363061c36bdeb (diff)
downloadlorry-825c6c4eb2b534303211ff05a06a90242f6044de.tar.gz
lorry missing or relative path makes it fail
lorry was failing to cope with missing or relative working directory. After fix if no directory is given it will show a message that no working directory in path and will use "workd" directory. It will also create the directory if it isn't present.
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry7
1 files changed, 7 insertions, 0 deletions
diff --git a/lorry b/lorry
index 52ebe8c..2927be3 100755
--- a/lorry
+++ b/lorry
@@ -67,6 +67,13 @@ class Lorry(cliapp.Application):
def process_args(self, args):
status = 0
+
+ if self.settings['working-area'] == '' :
+ print 'No working area defined going to use "workd" directory'
+ self.settings['working-area'] = 'workd'
+ if not os.path.exists(self.settings['working-area']):
+ os.makedirs(self.settings['working-area'])
+
for arg in args:
self.progress('Processing spec file %s' % arg)
with open(arg) as f: