diff options
-rw-r--r-- | glances/plugins/glances_hddtemp.py | 2 | ||||
-rwxr-xr-x | unitest.py | 8 |
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 @@ -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) |