diff options
author | Torben <torben.letorbi@gmail.com> | 2015-12-04 18:14:30 +0100 |
---|---|---|
committer | Torben <torben.letorbi@gmail.com> | 2015-12-11 10:24:09 +0100 |
commit | 9f3385e9b87e0e99750bf051e121f7eceabe23f2 (patch) | |
tree | 02e176381ad8da38726f3d459d8e97b9091d688d /GitAutoDeploy.py | |
parent | 2c84f5706c075252b0b487e015fe5705a8d8f48c (diff) | |
download | Git-Auto-Deploy-9f3385e9b87e0e99750bf051e121f7eceabe23f2.zip Git-Auto-Deploy-9f3385e9b87e0e99750bf051e121f7eceabe23f2.tar.gz Git-Auto-Deploy-9f3385e9b87e0e99750bf051e121f7eceabe23f2.tar.bz2 |
Improve clone error message; Refactor if statements
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-x | GitAutoDeploy.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py index 9562a79..abbde91 100755 --- a/GitAutoDeploy.py +++ b/GitAutoDeploy.py @@ -438,13 +438,10 @@ class GitAutoDeploy(object): if not os.path.isdir(repo_config['path']): print "Directory %s not found" % 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']) + GitWrapper.clone(url=repo_config['url'], branch=repo_config['branch'] if 'branch' in repo_config else None, path=repo_config['path']) if not os.path.isdir(repo_config['path']): - print "Unable to clone repository %s" % repo_config['url'] + print "Unable to clone %s branch of repository %s" % (repo_config['branch'] if 'branch' in repo_config else "default", repo_config['url']) sys.exit(2) else: |