提交 27b958a6 编写于 作者: A Alessio Sergi

Fix config file detection under virtualenv

上级 5c61e5b7
......@@ -102,10 +102,10 @@ class Config(object):
paths.append(os.path.join(
os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config'),
__appname__, self.config_filename))
if is_linux:
paths.append(os.path.join('/etc', __appname__, self.config_filename))
else:
if hasattr(sys, 'real_prefix') or is_bsd:
paths.append(os.path.join(sys.prefix, 'etc', __appname__, self.config_filename))
else:
paths.append(os.path.join('/etc', __appname__, self.config_filename))
elif is_mac:
paths.append(os.path.join(
os.path.expanduser('~/Library/Application Support/'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册