summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Client.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Client/Client.py')
-rw-r--r--src/lib/Bcfg2/Client/Client.py20
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']: