From 30b441aa34dbb35b23ce38f99dfb6c02e961a205 Mon Sep 17 00:00:00 2001 From: Tim Nibert Date: Sat, 25 Aug 2018 17:55:23 +1000 Subject: [PATCH] fixed test for appveyor --- unitest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/unitest.py b/unitest.py index 7db7377d..afcb69f1 100755 --- a/unitest.py +++ b/unitest.py @@ -256,7 +256,12 @@ class TestGlances(unittest.TestCase): def test_016_hddsmart(self): """Check hard disk SMART data plugin.""" - from glances.plugins.glances_smart import is_admin + try: + from glances.plugins.glances_smart import is_admin + except ImportError: + print("INFO: [TEST_016] pySMART not found, not running SMART plugin test") + return + stat = 'DeviceName' print('INFO: [TEST_016] Check SMART stats: {}'.format(stat)) stats_grab = stats.get_plugin('smart').get_raw() -- GitLab