diff --git a/tests/test_fuga/test_pyfuga.py b/tests/test_fuga/test_pyfuga.py index 2053c33f94b7b0691c3dd39b1282fd29ca0d8e0a..92e58bd8e3eb1deff0a0e44cbabdc7855dc843f1 100644 --- a/tests/test_fuga/test_pyfuga.py +++ b/tests/test_fuga/test_pyfuga.py @@ -35,7 +35,7 @@ class Test(unittest.TestCase): def lib_missing(self): lib_path = os.path.dirname(py_fuga.__file__) + "/Colonel/FugaLib/FugaLib.%s" % ('so', 'dll')[os.name == 'nt'] - return os.path.isfile(lib_path) + return os.path.isfile(lib_path) is False def get_fuga(self, tb_x=[423974, 424033], tb_y=[6151447, 6150889]): return PyFuga(farm_name='Horns Rev 1', diff --git a/topfarm/cost_models/fuga/py_fuga.py b/topfarm/cost_models/fuga/py_fuga.py index b9a3d55dfd0205bcb693f6ff12925df8725e33d4..54c7423d96b5d610ca553913ddd0dbc35f34899b 100644 --- a/topfarm/cost_models/fuga/py_fuga.py +++ b/topfarm/cost_models/fuga/py_fuga.py @@ -33,7 +33,7 @@ class PyFuga(object): self.stdout_filename = f.name + "pyfuga.txt" lib_path = os.path.dirname(__file__) + "/Colonel/FugaLib/FugaLib.%s" % ('so', 'dll')[os.name == 'nt'] - if os.path.isfile(lib_path): + if os.path.isfile(lib_path) is False: raise Exception("Fuga lib cannot be found: '%s'" % lib_path) self.lib = PascalDLL(lib_path)