Skip to content

Commit

Permalink
Updated windows file reference executable path for config
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkagy committed Dec 4, 2017
1 parent 1b5b5bc commit d3a3ce6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
from vivo_config import VivoConfig

default_sentinel_config = os.path.normpath(
os.path.join(os.path.dirname(__file__), '../sentinel.conf')
os.path.join(os.path.dirname(__file__), 'sentinel.conf')
)

if not os.path.isfile(default_sentinel_config):
base = os.path.abspath(os.path.dirname(sys.argv[0]))
default_sentinel_config = os.path.join(base, 'sentinel.conf')

sentinel_config_file = os.environ.get('SENTINEL_CONFIG', default_sentinel_config)
sentinel_cfg = VivoConfig.tokenize(sentinel_config_file)
sentinel_version = "1.1.0"
Expand All @@ -22,7 +27,7 @@ def get_vivo_conf():
vivo_conf = os.path.join(os.environ['APPDATA'], "VivoCore/Vivo.conf")
else:
vivo_conf = os.path.join(home, ".vivocore/vivo.conf")
vivo_conf = sentinel_cfg.get('vivo_conf', vivo_conf)
vivo_conf = sentinel_cfg.get('vivo_conf',vivo_conf)

return vivo_conf

Expand Down

0 comments on commit d3a3ce6

Please sign in to comment.