diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-01-31 14:25:48 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-01-31 14:25:48 +0000 |
commit | 7306eed5846b63fdbb88b450c4f7dae639dc4eb8 (patch) | |
tree | a546b5b513ffad27726a183fb026114fce2e28f5 /src | |
parent | 6c94f611a5c510435de3961550c2f95b5c7de944 (diff) | |
download | poezio-7306eed5846b63fdbb88b450c4f7dae639dc4eb8.tar.gz poezio-7306eed5846b63fdbb88b450c4f7dae639dc4eb8.tar.bz2 poezio-7306eed5846b63fdbb88b450c4f7dae639dc4eb8.tar.xz poezio-7306eed5846b63fdbb88b450c4f7dae639dc4eb8.zip |
fix la copie du fichier de conf au premier demerrage
Diffstat (limited to 'src')
-rw-r--r-- | src/config.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/config.py b/src/config.py index 4d751072..09959437 100644 --- a/src/config.py +++ b/src/config.py @@ -81,10 +81,11 @@ class Config(RawConfigParser): CONFIG_HOME = environ.get("XDG_CONFIG_HOME") if not CONFIG_HOME: - CONFIG_HOME = environ.get('HOME')+'/.config/' -CONFIG_PATH = CONFIG_HOME + 'poezio/' + CONFIG_HOME = environ.get('HOME')+'/.config' +CONFIG_PATH = CONFIG_HOME + '/poezio/' -makedirs(CONFIG_PATH) +try:makedirs(CONFIG_PATH) +except:pass copy2('../data/default_config.cfg', CONFIG_PATH+'poezio.cfg') config = Config(CONFIG_PATH+'poezio.cfg') |