mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-05 08:39:15 +03:00
Fix some bare except statements
This commit is contained in:
parent
7f902d3f5b
commit
34434c5f44
@ -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
|
||||
|
@ -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"]))
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user