Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
larsklitzke committed Sep 11, 2023
1 parent 906e5fc commit 92dee54
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions xodr2nxgpd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
logging.basicConfig()

if sys.prefix in os.path.abspath(__file__):
# the package was installed
logging.info('Prepare to run in deployment mode')
ROOT_PATH = os.path.join(sys.prefix, 'etc', os.path.basename(os.path.dirname(__file__)))

if not os.path.exists(ROOT_PATH):
ROOT_PATH = os.path.join(sys.prefix, 'local', 'etc', os.path.basename(os.path.dirname(__file__)))

if not os.path.exists(ROOT_PATH):
raise RuntimeError('Failed to find tasi supplementary data in system prefix %s.', sys.prefix)
raise RuntimeError('Failed to find supplementary data in system prefix %s.', sys.prefix)

else:
logging.info('Prepare to run in development mode')
# we are in development mode
ROOT_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'etc')

0 comments on commit 92dee54

Please sign in to comment.