Skip to content
Snippets Groups Projects
Unverified Commit b1344dd4 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

ENH: add "PYCAOSDBINI" envvar

parent 3eee57b9
Branches
Tags
No related merge requests found
......@@ -24,7 +24,7 @@
# Import of the connection function (which is used to connect to the DB):
from os.path import expanduser, join
from os import getcwd
from os import getcwd, environ
from caosdb.configuration import configure, get_config
from caosdb.common import administration
......@@ -44,5 +44,8 @@ from caosdb.common.models import (delete, execute_query, raise_errors,
import caosdb.apiutils
# read configuration these files
configure(expanduser('~/.pycaosdb.ini'))
if "PYCAOSDBINI" in environ:
configure(expanduser(environ["PYCAOSDBINI"]))
else:
configure(expanduser('~/.pycaosdb.ini'))
configure(join(getcwd(), "pycaosdb.ini"))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment