summaryrefslogtreecommitdiffstats
path: root/GitAutoDeploy.py
diff options
context:
space:
mode:
authorOliver Poignant <oliver@poignant.se>2015-08-19 00:14:06 +0200
committerOliver Poignant <oliver@poignant.se>2015-08-19 00:14:06 +0200
commit49549254476133819a98c31ad68f52f571a81db8 (patch)
tree220ab7568ae66e03576ef1a6287fdcefeb9a1b4f /GitAutoDeploy.py
parentbaca5b9a49e1b8cbac1fe7a27e146cc316158b9c (diff)
downloadGit-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-xGitAutoDeploy.py11
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)