-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from jorana/utilix_import
Utilix import
- Loading branch information
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.') | ||
|