提交 fc869b7a 编写于 作者: N nicolargo

Correct an issue on the latest commit, cause unitary tests failed

上级 0a99b139
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册