diff options
author | Adnan Ali <adnan.ali@codethink.co.uk> | 2012-02-15 10:27:41 +0000 |
---|---|---|
committer | Adnan Ali <adnan.ali@codethink.co.uk> | 2012-02-15 10:27:41 +0000 |
commit | 713ada140baee5dea05898061067b227b59eab90 (patch) | |
tree | e82e2637ab2ca82bec3fb44690b8b8e96a3bf9cc /lorry | |
parent | 869240436ceb582afaf4586105155f0446ea8e17 (diff) | |
download | lorry-713ada140baee5dea05898061067b227b59eab90.tar.gz |
lorry should exit with non-zero value in case any mirror fail
the exit code will be number of mirror failed
Diffstat (limited to 'lorry')
-rwxr-xr-x | lorry | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -21,7 +21,7 @@ import logging import os import urllib2 import string - +import sys __version__ = '0.0' @@ -66,6 +66,7 @@ class Lorry(cliapp.Application): metavar='BUNDLES') def process_args(self, args): + status = 0 for arg in args: self.progress('Processing spec file %s' % arg) with open(arg) as f: @@ -75,10 +76,12 @@ class Lorry(cliapp.Application): print 'Getting: ',name self.gitify(name, specs[name]) except Exception,e: + status += 1 print 'Exception:',e logging.debug('Mirroring Error: %s' %e) self.progress('Done') - + #print 'total failed:',status + sys.exit(status) def bundle(self, name, gitdir): if self.settings['bundle'] == 'never': return |