Skip to content

Commit

Permalink
Merge pull request #33 from jorana/utilix_import
Browse files Browse the repository at this point in the history
Utilix import
  • Loading branch information
ershockley committed Jan 29, 2021
2 parents 4da4288 + 96b5441 commit 957e575
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions utilix/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
__version__ = '0.4.0'
# instantiate here so we just do it once
from warnings import warn

from utilix.config import Config
uconfig = Config()
try:
from utilix.config import Config
uconfig = Config()

from utilix.rundb import DB
db = DB()
from utilix.rundb import DB
db = DB()
except FileNotFoundError as e:
uconfig = None
warn(f'Utilix cannot find config file:\n {e}\nWithout it, you cannot '
f'access the database. See https://github.com/XENONnT/utilix.')

0 comments on commit 957e575

Please sign in to comment.