summaryrefslogtreecommitdiff
path: root/src/config.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-06-18 11:55:21 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-06-18 11:55:21 +0200
commite56b8d9853bae436ccd2845ae63c6b30fa628cad (patch)
tree2cabab2cc990670790c93a8d39892fe2bbdfbdff /src/config.py
parent63db93c9992f41283002a7034ce610ae75736a58 (diff)
parentdd9186c72a04f449c427bce31d35a283f3c61c25 (diff)
downloadpoezio-e56b8d9853bae436ccd2845ae63c6b30fa628cad.tar.gz
poezio-e56b8d9853bae436ccd2845ae63c6b30fa628cad.tar.bz2
poezio-e56b8d9853bae436ccd2845ae63c6b30fa628cad.tar.xz
poezio-e56b8d9853bae436ccd2845ae63c6b30fa628cad.zip
Merge, j'ai rien compris
Diffstat (limited to 'src/config.py')
-rw-r--r--src/config.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config.py b/src/config.py
index 4776e7d3..9cedcac7 100644
--- a/src/config.py
+++ b/src/config.py
@@ -134,18 +134,18 @@ class Config(RawConfigParser):
# and copy the default config in it
CONFIG_HOME = environ.get("XDG_CONFIG_HOME")
if not CONFIG_HOME:
- CONFIG_HOME = environ.get('HOME')+'/.config'
-CONFIG_PATH = CONFIG_HOME + '/poezio/'
+ CONFIG_HOME = path.join(environ.get('HOME'), '.config')
+CONFIG_PATH = path.join(CONFIG_HOME, 'poezio')
try:
makedirs(CONFIG_PATH)
except OSError:
pass
-if not path.isfile(CONFIG_PATH+'poezio.cfg'):
- copy2(path.join(path.dirname(__file__), '../data/default_config.cfg'), CONFIG_PATH+'poezio.cfg')
+if not path.isfile(path.join(CONFIG_PATH, 'poezio.cfg')):
+ copy2(path.join(path.dirname(__file__), '../data/default_config.cfg'), path.join(CONFIG_PATH, 'poezio.cfg'))
parser = OptionParser()
-parser.add_option("-f", "--file", dest="filename", default=CONFIG_PATH+'poezio.cfg',
+parser.add_option("-f", "--file", dest="filename", default=path.join(CONFIG_PATH, 'poezio.cfg'),
help="The config file you want to use", metavar="CONFIG_FILE")
parser.add_option("-d", "--debug", dest="debug",
help="The file where debug will be written", metavar="DEBUG_FILE")