From 89e7afbf74ffbbb54dd892bf2c4245aedee2a832 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 9 Dec 2014 11:10:24 -0600 Subject: Remove blanket excepts from plugins and lint This removes most blanket except: clauses from all plugins, including the base plugin libraries, and bcfg2-lint. The few that remain should all be necessary. Most of the changes were quite minor, but this did require some restructuring of the CfgPrivateKeyCreator; as a result, the tests for that module were rewritten. --- src/lib/Bcfg2/Server/Plugins/Probes.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/lib/Bcfg2/Server/Plugins/Probes.py') diff --git a/src/lib/Bcfg2/Server/Plugins/Probes.py b/src/lib/Bcfg2/Server/Plugins/Probes.py index 21d50ace6..76aab69b5 100644 --- a/src/lib/Bcfg2/Server/Plugins/Probes.py +++ b/src/lib/Bcfg2/Server/Plugins/Probes.py @@ -405,7 +405,7 @@ class ProbeSet(Bcfg2.Server.Plugin.EntrySet): else: try: probe.text = entry.data - except: # pylint: disable=W0702 + except ValueError: self.logger.error("Client unable to handle unicode " "probes. Skipping %s" % probe.get('name')) @@ -447,12 +447,7 @@ class Probes(Bcfg2.Server.Plugin.Probing, Bcfg2.Server.Plugin.Connector.__init__(self) Bcfg2.Server.Plugin.DatabaseBacked.__init__(self, core) - try: - self.probes = ProbeSet(self.data, self.name) - except: - err = sys.exc_info()[1] - raise Bcfg2.Server.Plugin.PluginInitError(err) - + self.probes = ProbeSet(self.data, self.name) if self._use_db: self.probestore = DBProbeStore(core, self.data) else: -- cgit v1.2.3-1-g7c22