diff options
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 1e14f2c..f35f27f 100755 --- a/GitAutoDeploy.py +++ b/GitAutoDeploy.py @@ -341,8 +341,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 @@ -377,7 +378,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() @@ -575,6 +577,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() @@ -583,6 +588,7 @@ class GitAutoDeploy(object): self.create_pid_file() + # Suppress output if '-q' in argv or '--quiet' in argv: sys.stdout = open(os.devnull, 'w') |