diff --git a/rsudp/c_testing.py b/rsudp/c_testing.py index df479fd..c3ba7bf 100644 --- a/rsudp/c_testing.py +++ b/rsudp/c_testing.py @@ -121,7 +121,7 @@ def _messagetests(self, d): t.TEST['x_IMGPATH'][1] = True def _img_test(self): - if (t.TEST['c_img'] and IMGPATH): + if ('c_img' in t.TEST and t.TEST['c_img'] and IMGPATH): t.TEST['c_img'][1] = os.path.exists(IMGPATH) dn, fn = os.path.dirname(IMGPATH), os.path.basename(IMGPATH) os.replace(IMGPATH, os.path.join(dn, 'test.' + fn)) diff --git a/rsudp/test.py b/rsudp/test.py index 5dd7707..339c925 100644 --- a/rsudp/test.py +++ b/rsudp/test.py @@ -163,7 +163,7 @@ def cancel_tests(settings, MPL, plot, quiet): else: settings['plot']['enabled'] = False del TEST['d_matplotlib'] - del TEST['c_IMGPATH'] + del TEST['x_IMGPATH'] del TEST['c_img'] printM('Plot is disabled') @@ -248,3 +248,4 @@ def is_connected(hostname): except: pass return False +