aboutsummaryrefslogtreecommitdiff
path: root/grs
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-07-06 14:16:17 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-07-06 14:16:17 -0400
commitd4c28761646b141bd6bd7a75524be82b8989ac9e (patch)
treea06f040768eef2b9a01aac52be7145a922d6f73a /grs
parentgrsup: some bug fixes. (diff)
downloadgrss-d4c28761646b141bd6bd7a75524be82b8989ac9e.tar.gz
grss-d4c28761646b141bd6bd7a75524be82b8989ac9e.tar.bz2
grss-d4c28761646b141bd6bd7a75524be82b8989ac9e.zip
WorldConf.py: clean up code a bit.
Diffstat (limited to 'grs')
-rw-r--r--grs/WorldConf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/grs/WorldConf.py b/grs/WorldConf.py
index f9eefe8..b102e7d 100644
--- a/grs/WorldConf.py
+++ b/grs/WorldConf.py
@@ -23,8 +23,8 @@ class WorldConf():
for s in config.sections():
for (directory, value) in config[s].items():
p_slot_atom = re.sub('[/:]', '_', s)
- fpath = os.path.join(CONST.PORTAGE_CONFIGDIR, '%s/%s' % (directory, p_slot_atom))
- dpath = os.path.dirname(fpath)
+ dpath = os.path.join(CONST.PORTAGE_CONFIGDIR, directory)
+ fpath = os.path.join(dpath, p_slot_atom)
os.makedirs(dpath, mode=0o755, exist_ok=True)
with open(fpath, 'w') as g:
g.write('%s\n' % value)