Skip to content

Commit

Permalink
Detect current virtualenv in a more compatible way
Browse files Browse the repository at this point in the history
This broke down horribly during a bit of reorganization of how the tests
are run, and under which versions of virtualenv they run.

See https://stackoverflow.com/a/1883251 for details on why this needs to
change.
  • Loading branch information
lunkwill42 committed Mar 7, 2023
1 parent ecc47c0 commit 67d17c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/nav/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'/etc/nav',
os.path.join(buildconf.datadir, 'conf'),
]
_venv = os.getenv('VIRTUAL_ENV')
_venv = sys.prefix if sys.prefix != sys.base_prefix else None
if _venv:
CONFIG_LOCATIONS = [
os.path.join(_venv, 'etc'),
Expand Down

0 comments on commit 67d17c9

Please sign in to comment.