summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorAdnan Ali <adnan.ali@codethink.co.uk>2012-02-15 10:27:41 +0000
committerAdnan Ali <adnan.ali@codethink.co.uk>2012-02-15 10:27:41 +0000
commit713ada140baee5dea05898061067b227b59eab90 (patch)
treee82e2637ab2ca82bec3fb44690b8b8e96a3bf9cc /lorry
parent869240436ceb582afaf4586105155f0446ea8e17 (diff)
downloadlorry-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-xlorry7
1 files changed, 5 insertions, 2 deletions
diff --git a/lorry b/lorry
index 62ef08a..cea5748 100755
--- a/lorry
+++ b/lorry
@@ -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