summaryrefslogtreecommitdiffstats
path: root/gitautodeploy/gitautodeploy.py
diff options
context:
space:
mode:
authorOliver Poignant <oliver@poignant.se>2016-05-07 19:48:03 +0200
committerOliver Poignant <oliver@poignant.se>2016-05-07 19:48:03 +0200
commitbc464eafdb743bd2cd6db2525f661de13ca4ef9a (patch)
tree2559ebae05567b039d43ce8a4d9bcb5c84e0e0d9 /gitautodeploy/gitautodeploy.py
parentb72fbdfe8626fb68cf430995270c104b86d5e876 (diff)
downloadGit-Auto-Deploy-bc464eafdb743bd2cd6db2525f661de13ca4ef9a.zip
Git-Auto-Deploy-bc464eafdb743bd2cd6db2525f661de13ca4ef9a.tar.gz
Git-Auto-Deploy-bc464eafdb743bd2cd6db2525f661de13ca4ef9a.tar.bz2
Check git pull status code when cloning all repos
Diffstat (limited to 'gitautodeploy/gitautodeploy.py')
-rw-r--r--gitautodeploy/gitautodeploy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitautodeploy/gitautodeploy.py b/gitautodeploy/gitautodeploy.py
index cd90846..98ebeb1 100644
--- a/gitautodeploy/gitautodeploy.py
+++ b/gitautodeploy/gitautodeploy.py
@@ -105,9 +105,9 @@ class GitAutoDeploy(object):
continue
# Clone repository
- GitWrapper.clone(url=repo_config['url'], branch=repo_config['branch'], path=repo_config['path'])
+ ret = GitWrapper.clone(url=repo_config['url'], branch=repo_config['branch'], path=repo_config['path'])
- if os.path.isdir(repo_config['path']):
+ if ret == 0 and os.path.isdir(repo_config['path']):
logger.info("Repository %s successfully cloned" % repo_config['url'])
else:
logger.error("Unable to clone %s branch of repository %s" % (repo_config['branch'], repo_config['url']))