Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Karthikeyan Singaravelan
poezio
Commits
7d82a4fb
Commit
7d82a4fb
authored
Jun 04, 2011
by
mathieui
Browse files
some path.join forgotten causing the config file to be overwritten an not taken into account…
parent
e27c6d74
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.py
View file @
7d82a4fb
...
...
@@ -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
=
path
.
join
(
environ
.
get
(
'HOME'
),
'
/
.config'
)
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'
):
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"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment