diff options
author | Oliver Poignant <oliver@poignant.se> | 2015-08-19 00:14:06 +0200 |
---|---|---|
committer | Oliver Poignant <oliver@poignant.se> | 2015-08-19 00:14:06 +0200 |
commit | 49549254476133819a98c31ad68f52f571a81db8 (patch) | |
tree | 220ab7568ae66e03576ef1a6287fdcefeb9a1b4f /GitAutoDeploy.py | |
parent | baca5b9a49e1b8cbac1fe7a27e146cc316158b9c (diff) | |
download | Git-Auto-Deploy-49549254476133819a98c31ad68f52f571a81db8.zip Git-Auto-Deploy-49549254476133819a98c31ad68f52f571a81db8.tar.gz Git-Auto-Deploy-49549254476133819a98c31ad68f52f571a81db8.tar.bz2 |
Updated documentation
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-x | GitAutoDeploy.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py index 126e86e..5420774 100755 --- a/GitAutoDeploy.py +++ b/GitAutoDeploy.py @@ -321,8 +321,16 @@ class GitAutoDeploy(object): print "%s file is not valid JSON\n" % self.config_path raise e + # Translate any ~ in the path into /home/<user> + if 'pidfilepath' in self._config: + self._config['pidfilepath'] = os.path.expanduser(self._config['pidfilepath']) + for repo_config in self._config['repositories']: + # Translate any ~ in the path into /home/<user> + if 'path' in repo_config: + repo_config['path'] = os.path.expanduser(repo_config['path']) + if not os.path.isdir(repo_config['path']): print "Directory %s not found" % repo_config['path'] @@ -393,7 +401,7 @@ class GitAutoDeploy(object): f.write(str(os.getpid())) def read_pid_file(self): - with open(self.get_config()['pidfilepath'],'r') as f: + with open(self.get_config()['pidfilepath'], 'r') as f: return f.readlines() def remove_pid_file(self): @@ -402,7 +410,6 @@ class GitAutoDeploy(object): def exit(self): import sys - print '\nGoodbye' self.remove_pid_file() sys.exit(0) |