Commit 7f6104bb authored by William Jon McCann's avatar William Jon McCann Committed by John (J5) Palmieri
parent 888ba364
......@@ -104,10 +104,13 @@ class Settings:
Parameters:
filename -- path to the settings file.
If None, the default ~/.dfeet/config will be used.
If None, the default $XDG_CONFIG_HOME/d-feet/config will be used.
"""
if not filename:
self.filename = os.path.expanduser("~/.d-feet/config")
if os.environ.has_key('XDG_CONFIG_HOME'):
self.filename = os.path.join(os.environ['XDG_CONFIG_HOME'], 'd-feet', 'config')
else:
self.filename = os.path.join(os.environ['HOME'], '.config', 'd-feet', 'config')
else:
self.filename = filename
self.config = ConfigParser.ConfigParser()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment