diff --git a/km3buu/__init__.py b/km3buu/__init__.py index 95b9af090cf6af54b3f8f44e6cffda2131dac284..b2281c9048b883f908cb5eb08173ea6c1e5605bd 100644 --- a/km3buu/__init__.py +++ b/km3buu/__init__.py @@ -2,8 +2,10 @@ from .__version__ import version from os.path import isfile, abspath, join, dirname -image_path = abspath(join(dirname(__file__), "..", "GiBUU.simg")) -if not isfile(image_path): +MODULE_PATH = abspath(join(dirname(__file__), "..")) +IMAGE_PATH = join(MODULE_PATH, "GiBUU.simg") + +if not isfile(IMAGE_PATH): raise EnvironmentError( "GiBUU image was not found at %s; please run `make build` or `make buildremote`" - % image_path) + % IMAGE_PATH)