Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/config_modules/reposconf/
Date: Sun, 08 Feb 2015 03:39:58
Message-Id: 1423366698.1ea6a261a39e8bb6f5c9c6a5a55424b54fcddbf7.dolsen@gentoo
1 commit: 1ea6a261a39e8bb6f5c9c6a5a55424b54fcddbf7
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 8 03:38:18 2015 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 8 03:38:18 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=1ea6a261
7
8 config_modules/reposconf/reposconf.py: Sort the overlays
9
10 ---
11 layman/config_modules/reposconf/reposconf.py | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
13
14 diff --git a/layman/config_modules/reposconf/reposconf.py b/layman/config_modules/reposconf/reposconf.py
15 index 5848796..8b678eb 100644
16 --- a/layman/config_modules/reposconf/reposconf.py
17 +++ b/layman/config_modules/reposconf/reposconf.py
18 @@ -40,7 +40,7 @@ from layman.utils import path
19 class ConfigHandler:
20
21 def __init__(self, config, overlays):
22 -
23 +
24 self.config = config
25 self.output = config['output']
26 self.overlays = overlays
27 @@ -58,7 +58,7 @@ class ConfigHandler:
28 '''
29 try:
30 read_files = config.read(self.path)
31 -
32 +
33 if not read_files:
34 self.output.warn("Warning, not able to parse config file: %(path)s"\
35 % ({'path':self.path}))
36 @@ -161,7 +161,7 @@ class ConfigHandler:
37 # If the repos.conf is empty check to see if we can write
38 # all the overlays to the file.
39 if not self.repo_conf.sections():
40 - for i in self.overlays:
41 + for i in sorted(self.overlays):
42 if not i == delete:
43 self.add(self.overlays[i])
44 self.repo_conf.write(laymanconf)