From 9310c08f4d3387dbfb8b12162ff2d904383a3c25 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Tue, 2 Apr 2013 22:56:01 +0200 Subject: [PATCH] config: Use path.expand_path and $XDG_CONFIG_DIR instead of hardcoded .config --- mopidy/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/__main__.py b/mopidy/__main__.py index 78968dc7..16ef61bc 100644 --- a/mopidy/__main__.py +++ b/mopidy/__main__.py @@ -244,7 +244,7 @@ def load_config(options, extensions): files = [ '/etc/mopidy/mopidy.conf', - '~/.config/mopidy/mopidy.conf', + '$XDG_CONFIG_DIR/mopidy/mopidy.conf', ] # TODO Add config file given through `options` to `files` # TODO Replace `files` with single file given through `options` @@ -262,7 +262,7 @@ def load_config(options, extensions): # Load config from a series of config files for filename in files: - filename = os.path.expanduser(filename) + filename = path.expand_path(filename) try: filehandle = codecs.open(filename, encoding='utf-8') parser.readfp(filehandle)