Fix some bare except statements

This commit is contained in:
Alessio Sergi 2016-12-20 13:31:17 +01:00
parent 7f902d3f5b
commit 34434c5f44
4 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,7 @@ class Export(GlancesExport):
# Table
try:
session.execute("CREATE TABLE %s (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time)) WITH CLUSTERING ORDER BY (time DESC)" % self.table)
except:
except Exception:
logger.debug("Cassandra table %s already exist" % self.table)
return cluster, session

View File

@ -93,7 +93,7 @@ class FolderList(object):
for i in ['careful', 'warning', 'critical']:
try:
value[i] = self.config.get_value(section, key + i)
except:
except Exception:
value[i] = None
logger.debug("No {} threshold for folder {}".format(i, value["path"]))

View File

@ -158,7 +158,7 @@ class Plugin(GlancesPlugin):
# First time, try to connect to the server
try:
self.docker_client = self.connect()
except:
except Exception:
docker_tag = False
else:
if self.docker_client is None:

View File

@ -98,7 +98,7 @@ class Plugin(GlancesPlugin):
netstatus = {}
try:
netstatus = psutil.net_if_stats()
except:
except AttributeError:
pass
# Previous network interface stats are stored in the network_old variable