Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/grss:master commit in: grs/
Date: Mon, 06 Jul 2015 18:13:57
Message-Id: 1436206577.d4c28761646b141bd6bd7a75524be82b8989ac9e.blueness@gentoo
1 commit: d4c28761646b141bd6bd7a75524be82b8989ac9e
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 6 18:16:17 2015 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 6 18:16:17 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=d4c28761
7
8 WorldConf.py: clean up code a bit.
9
10 grs/WorldConf.py | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13 diff --git a/grs/WorldConf.py b/grs/WorldConf.py
14 index f9eefe8..b102e7d 100644
15 --- a/grs/WorldConf.py
16 +++ b/grs/WorldConf.py
17 @@ -23,8 +23,8 @@ class WorldConf():
18 for s in config.sections():
19 for (directory, value) in config[s].items():
20 p_slot_atom = re.sub('[/:]', '_', s)
21 - fpath = os.path.join(CONST.PORTAGE_CONFIGDIR, '%s/%s' % (directory, p_slot_atom))
22 - dpath = os.path.dirname(fpath)
23 + dpath = os.path.join(CONST.PORTAGE_CONFIGDIR, directory)
24 + fpath = os.path.join(dpath, p_slot_atom)
25 os.makedirs(dpath, mode=0o755, exist_ok=True)
26 with open(fpath, 'w') as g:
27 g.write('%s\n' % value)