diff --git a/scullery.py b/scullery.py index e1d569d..950c705 100755 --- a/scullery.py +++ b/scullery.py @@ -47,7 +47,11 @@ is_packaged = False if is_packaged: vagfile='/usr/share/scullery/{}'.format(vagfile) else: - vagfile='{}/{}'.format(os.path.abspath(os.path.dirname(__file__)), vagfile) + try: + me = __file__ + except NameError: + me = sys.argv[0] + vagfile='{}/{}'.format(os.path.abspath(os.path.dirname(me)), vagfile) def _abort(msg): log.error(msg)