diff options
author | Oliver Poignant <oliver@poignant.se> | 2015-09-19 20:48:42 +0200 |
---|---|---|
committer | Oliver Poignant <oliver@poignant.se> | 2015-09-19 20:48:42 +0200 |
commit | 93b0273206c8600603db3c0c9f1207d8c5f0c206 (patch) | |
tree | fe830b67795087b80ef7a8cc2adde4d96e048ebc /GitAutoDeploy.py | |
parent | 6a565706a8b25e18ec4deb098aa96743318384c6 (diff) | |
download | Git-Auto-Deploy-93b0273206c8600603db3c0c9f1207d8c5f0c206.zip Git-Auto-Deploy-93b0273206c8600603db3c0c9f1207d8c5f0c206.tar.gz Git-Auto-Deploy-93b0273206c8600603db3c0c9f1207d8c5f0c206.tar.bz2 |
Fixed bug causing config scan to not work when starting in daemon mode
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-x | GitAutoDeploy.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py index c5c44af..0741810 100755 --- a/GitAutoDeploy.py +++ b/GitAutoDeploy.py @@ -324,8 +324,9 @@ class GitAutoDeploy(object): if waiting_lock.has_lock(): waiting_lock.release() - def get_config_path(self): - import os, re + def get_default_config_path(self): + import os + import re if self.config_path: return self.config_path @@ -360,7 +361,8 @@ class GitAutoDeploy(object): if self._config: return self._config - self.config_path = self.get_config_path() + if not self.config_path: + self.config_path = self.get_default_config_path() try: config_string = open(self.config_path).read() @@ -554,6 +556,9 @@ class GitAutoDeploy(object): self.config_path = os.path.realpath(argv[argv.index('--config') + 1]) print 'Using custom configuration file \'%s\'' % self.config_path + # Initialize config + self.get_config() + if self.daemon: print 'Starting Git Auto Deploy in daemon mode' GitAutoDeploy.create_daemon() @@ -562,6 +567,7 @@ class GitAutoDeploy(object): self.create_pid_file() + # Suppress output if '-q' in argv or '--quiet' in argv: sys.stdout = open(os.devnull, 'w') |