Gentoo Archives: gentoo-commits

From: Devan Franchini <twitch153@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Mon, 09 Feb 2015 18:25:44
Message-Id: 1423506311.1d9c2fe87449cfdd23b3bc45813a77a835513025.twitch153@gentoo
1 commit: 1d9c2fe87449cfdd23b3bc45813a77a835513025
2 Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 9 18:25:11 2015 +0000
4 Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 9 18:25:11 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=1d9c2fe8
7
8 updater.py: Adds repos.conf dir creation if it doesn't exist
9
10 ---
11 layman/updater.py | 10 ++++++++++
12 1 file changed, 10 insertions(+)
13
14 diff --git a/layman/updater.py b/layman/updater.py
15 index 6fd1281..ccf6c8d 100644
16 --- a/layman/updater.py
17 +++ b/layman/updater.py
18 @@ -182,6 +182,16 @@ class Main(object):
19
20 def create_repos_conf(self):
21 self.output.info(" Creating layman's repos.conf file")
22 + conf_dir = os.path.dirname(self.config['repos_conf'])
23 +
24 + if not os.path.isdir(conf_dir):
25 + try:
26 + os.mkdir(conf_dir)
27 + except OSError as e:
28 + self.output.error(' create_repos_conf() error creating %s: ' % conf_dir)
29 + self.output.error(' "%s"' % e)
30 + return None
31 +
32 layman_inst = LaymanAPI(config=self.config)
33 overlays = {}
34 for ovl in layman_inst.get_installed():