commit:     d4c28761646b141bd6bd7a75524be82b8989ac9e
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  6 18:16:17 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Jul  6 18:16:17 2015 +0000
URL:        https://gitweb.gentoo.org/proj/grss.git/commit/?id=d4c28761

WorldConf.py: clean up code a bit.

 grs/WorldConf.py | 4 ++--
 1 file 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)

Reply via email to