summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2012-10-04 11:16:50 +0100
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2012-10-04 11:16:50 +0100
commit75bbb3d59d7c9988699ffe4d0b638c2158b54c0e (patch)
tree29adf70a01188d3aadefcf29da58c79f1bccec62
parent01064514a4ef9d7062c34faef23bfb8002bbcc4f (diff)
downloadlorry-controller-75bbb3d59d7c9988699ffe4d0b638c2158b54c0e.tar.gz
Support repositories already existing as 'successful create'
-rwxr-xr-xlorry-controller10
1 files changed, 8 insertions, 2 deletions
diff --git a/lorry-controller b/lorry-controller
index 73b7a0b..1b86849 100755
--- a/lorry-controller
+++ b/lorry-controller
@@ -111,8 +111,14 @@ class LorryController(cliapp.Application):
exit, out, err = self.maybe_runcmd(["ssh", "git@localhost",
"create", new_lorry])
if exit != 0:
- logging.error("Unable to create repo %s" % new_lorry)
- store_state = False
+ if ' already exists' in err:
+ logging.warn("Repository %s already exists" %
+ new_lorry)
+ else:
+ logging.error("Unable to create repository %s" %
+ new_lorry)
+ logging.error(err)
+ store_state = False
if store_state:
mgr.lorry_state[new_lorry] = {
'conf': conf_uuid,