summaryrefslogtreecommitdiffstats
path: root/GitAutoDeploy.py
diff options
context:
space:
mode:
authorTorben <torben.letorbi@gmail.com>2015-12-04 17:58:14 +0100
committerTorben <torben.letorbi@gmail.com>2015-12-11 10:23:59 +0100
commit2c84f5706c075252b0b487e015fe5705a8d8f48c (patch)
tree23442dd6e667bdbc3f7570ac5af253577e269145 /GitAutoDeploy.py
parentc031f038193f66b3692267b1370fcc5dd2ab82fa (diff)
downloadGit-Auto-Deploy-2c84f5706c075252b0b487e015fe5705a8d8f48c.zip
Git-Auto-Deploy-2c84f5706c075252b0b487e015fe5705a8d8f48c.tar.gz
Git-Auto-Deploy-2c84f5706c075252b0b487e015fe5705a8d8f48c.tar.bz2
Fix cloning error when config defines no branch
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-xGitAutoDeploy.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py
index 7a809a4..9562a79 100755
--- a/GitAutoDeploy.py
+++ b/GitAutoDeploy.py
@@ -438,7 +438,10 @@ class GitAutoDeploy(object):
if not os.path.isdir(repo_config['path']):
print "Directory %s not found" % repo_config['path']
- GitWrapper.clone(url=repo_config['url'], branch=repo_config['branch'], path=repo_config['path'])
+ if 'branch' in repo_config:
+ GitWrapper.clone(url=repo_config['url'], branch=repo_config['branch'], path=repo_config['path'])
+ else:
+ GitWrapper.clone(url=repo_config['url'], branch=None, path=repo_config['path'])
if not os.path.isdir(repo_config['path']):
print "Unable to clone repository %s" % repo_config['url']