diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-11-13 16:36:21 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-11-13 16:36:21 -0500 |
commit | 5fc9984ce584b9f0a0982f4d5ce958cac8df9128 (patch) | |
tree | 4453a291375e924c52161b6b2b186ac863ae3242 /src | |
parent | 0ccb4cd10b38362ec61da22238b37b3a55adc7fb (diff) | |
download | bcfg2-5fc9984ce584b9f0a0982f4d5ce958cac8df9128.tar.gz bcfg2-5fc9984ce584b9f0a0982f4d5ce958cac8df9128.tar.bz2 bcfg2-5fc9984ce584b9f0a0982f4d5ce958cac8df9128.zip |
fixed client lock check
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Client/Client.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Client/Client.py b/src/lib/Bcfg2/Client/Client.py index 0400e3ff7..636aa5177 100644 --- a/src/lib/Bcfg2/Client/Client.py +++ b/src/lib/Bcfg2/Client/Client.py @@ -106,7 +106,9 @@ class Client(object): self.logger.info(ret.text) finally: os.unlink(scriptname) - except: # pylint: disable=W0702 + except SystemExit: + raise + except: self._probe_failure(name, sys.exc_info()[1]) return ret @@ -258,8 +260,7 @@ class Client(object): except Bcfg2.Client.XML.ParseError: syntax_error = sys.exc_info()[1] self.fatal_error("The configuration could not be parsed: %s" % - (syntax_error)) - return(1) + syntax_error) times['config_parse'] = time.time() @@ -296,10 +297,13 @@ class Client(object): "If you what to bypass the check, run " "with %s option" % Bcfg2.Options.OMIT_LOCK_CHECK.cmd) - except: # pylint: disable=W0702 + except SystemExit: + raise + except: lockfile = None self.logger.error("Failed to open lockfile") - # execute the said configuration + + # execute the configuration self.tools.Execute() if not self.setup['omit_lock_check']: |