summaryrefslogtreecommitdiffstats
path: root/gitautodeploy/gitautodeploy.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitautodeploy/gitautodeploy.py')
-rw-r--r--gitautodeploy/gitautodeploy.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/gitautodeploy/gitautodeploy.py b/gitautodeploy/gitautodeploy.py
index 21f1f16..8347d6a 100644
--- a/gitautodeploy/gitautodeploy.py
+++ b/gitautodeploy/gitautodeploy.py
@@ -110,18 +110,9 @@ class GitAutoDeploy(object):
continue
if os.path.isdir(repo_config['path']) and os.path.isdir(repo_config['path']+'/.git'):
- logger.debug("Repository %s already present" % repo_config['url'])
- continue
-
- logger.info("Repository %s not present and needs to be cloned" % repo_config['url'])
-
- # Clone repository
- ret = GitWrapper.clone(url=repo_config['url'], branch=repo_config['branch'], path=repo_config['path'])
-
- if ret == 0 and os.path.isdir(repo_config['path']):
- logger.info("Repository %s successfully cloned" % repo_config['url'])
+ GitWrapper.init(repo_config)
else:
- logger.error("Unable to clone %s branch of repository %s" % (repo_config['branch'], repo_config['url']))
+ GitWrapper.clone(repo_config)
def ssh_key_scan(self):
import re