diff options
author | Jason Kincl <kincljc@ornl.gov> | 2012-11-19 10:37:34 -0500 |
---|---|---|
committer | Jason Kincl <kincljc@ornl.gov> | 2012-11-19 10:37:34 -0500 |
commit | 894299b01b6138c54a99fd41f166554d175d6106 (patch) | |
tree | 88e11cb8c49d3f933cf5f622a93dfa123922960f /src/lib/Bcfg2/Client/Client.py | |
parent | de0ae51b6dc635a3acd2491d4ca3fd021aa55873 (diff) | |
parent | f4da37aa0a360add3f5c40f37cd3cc010ef8788f (diff) | |
download | bcfg2-894299b01b6138c54a99fd41f166554d175d6106.tar.gz bcfg2-894299b01b6138c54a99fd41f166554d175d6106.tar.bz2 bcfg2-894299b01b6138c54a99fd41f166554d175d6106.zip |
Merge remote branch 'upstream/master' into jasons-hacking
Diffstat (limited to 'src/lib/Bcfg2/Client/Client.py')
-rw-r--r-- | src/lib/Bcfg2/Client/Client.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/Bcfg2/Client/Client.py b/src/lib/Bcfg2/Client/Client.py index 0400e3ff7..f197a9074 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() @@ -292,14 +293,17 @@ class Client(object): fcntl.LOCK_EX | fcntl.LOCK_NB) except IOError: # otherwise exit and give a warning to the user - self.fatal_error("An other instance of Bcfg2 is running. " - "If you what to bypass the check, run " - "with %s option" % + self.fatal_error("Another instance of Bcfg2 is running. " + "If you want to bypass the check, run " + "with the %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']: |