main/path: Inline constants used once

This commit is contained in:
Stein Magnus Jodal 2013-04-08 20:42:33 +02:00
parent 8bf9242e5b
commit 335c4d9fd8
2 changed files with 4 additions and 8 deletions

View File

@ -309,9 +309,10 @@ def validate_config(raw_config, schemas, extensions=None):
def create_file_structures():
path.get_or_create_folder(path.DATA_PATH)
path.get_or_create_folder(path.CONFIG_PATH)
path.get_or_create_file(path.CONFIG_FILE)
path.get_or_create_folder(path.expand_path('$XDG_DATA_DIR/mopidy'))
path.get_or_create_folder(path.expand_path('$XDG_CONFIG_DIR/mopidy'))
path.get_or_create_file(
path.expand_path('$XDG_CONFIG_DIR/mopidy/mopidy.conf'))
def setup_audio(config):

View File

@ -25,11 +25,6 @@ XDG_DIRS = {
'XDG_DATA_DIR': XDG_DATA_DIR,
'XDG_MUSIC_DIR': XDG_MUSIC_DIR,
}
DATA_PATH = os.path.join(unicode(XDG_DATA_DIR), 'mopidy')
CONFIG_PATH = os.path.join(unicode(XDG_CONFIG_DIR), 'mopidy')
CONFIG_FILE = os.path.join(unicode(CONFIG_PATH), 'mopidy.conf')
SETTINGS_PATH = os.path.join(unicode(XDG_CONFIG_DIR), 'mopidy')
SETTINGS_FILE = os.path.join(unicode(SETTINGS_PATH), 'settings.py')
def get_or_create_folder(folder):