Commit 1f59ba1b authored by Łukasz Nowak's avatar Łukasz Nowak

monitor/test: Remove PYTHONPATH while calling python

The called python program is python3 program, and provided
PYTHONPATH is from python2, resulting in bad behaviour.
parent 6acdc8ca
......@@ -225,7 +225,13 @@ class EdgeSlaveMixin(MonitorTestMixin):
def assertSurykatkaStatusJSON(self):
if os.path.exists(self.surykatka_json):
os.unlink(self.surykatka_json)
original_environ = os.environ.copy()
os.environ.pop('PYTHONPATH', None)
try:
self.assertEqual(0, os.system(self.surykatka_status_json))
finally:
os.environ = original_environ
self.assertTrue(os.path.exists(self.surykatka_json))
with open(self.surykatka_json) as fh:
status_json = json.load(fh)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment