diff --git a/python/nav/config.py b/python/nav/config.py index 340195aef2..6c0c4d2c84 100644 --- a/python/nav/config.py +++ b/python/nav/config.py @@ -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'),