summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glances/plugins/glances_hddtemp.py2
-rwxr-xr-xunitest.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/glances/plugins/glances_hddtemp.py b/glances/plugins/glances_hddtemp.py
index ecb007ad..ceadbe76 100644
--- a/glances/plugins/glances_hddtemp.py
+++ b/glances/plugins/glances_hddtemp.py
@@ -92,7 +92,7 @@ class GlancesGrabHDDTemp(object):
self.reset()
# Only update if --disable-hddtemp is not set
- if self.args.disable_hddtemp:
+ if self.args is None or self.args.disable_hddtemp:
return
# Fetch the data
diff --git a/unitest.py b/unitest.py
index d01693c7..123783e4 100755
--- a/unitest.py
+++ b/unitest.py
@@ -78,14 +78,14 @@ class TestGlances(unittest.TestCase):
print('INFO: [TEST_000] Test the stats update function')
try:
stats.update()
- except:
- print('ERROR: Stats update failed')
+ except Exception as e:
+ print('ERROR: Stats update failed ({})'.format(e))
self.assertTrue(False)
time.sleep(1)
try:
stats.update()
- except:
- print('ERROR: Stats update failed')
+ except Exception as e:
+ print('ERROR: Stats update failed ({})'.format(e))
self.assertTrue(False)
self.assertTrue(True)