diff options
author | Adnan Ali <adnan.ali@codethink.co.uk> | 2012-02-20 11:07:15 +0000 |
---|---|---|
committer | Adnan Ali <adnan.ali@codethink.co.uk> | 2012-02-20 11:07:15 +0000 |
commit | 825c6c4eb2b534303211ff05a06a90242f6044de (patch) | |
tree | 9daf1e8dfbdbcbe450dff5dc9391cb89f28a1ce3 /lorry | |
parent | f879ddd5a35c185b867a6b66adb363061c36bdeb (diff) | |
download | lorry-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-x | lorry | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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: |