1 |
commit: fc428382a7b37ea19d91fef046482e6d574df9dd |
2 |
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 17 01:07:21 2014 +0000 |
4 |
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 17 01:07:21 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=fc428382 |
7 |
|
8 |
config.py: Improves quietness logic for OptionConfig |
9 |
|
10 |
This improvement prevents KeyError exceptions. |
11 |
|
12 |
--- |
13 |
layman/config.py | 4 ++-- |
14 |
1 file changed, 2 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/layman/config.py b/layman/config.py |
17 |
index 761dd57..ead56cf 100644 |
18 |
--- a/layman/config.py |
19 |
+++ b/layman/config.py |
20 |
@@ -302,7 +302,7 @@ class BareConfig(object): |
21 |
|
22 |
|
23 |
class OptionConfig(BareConfig): |
24 |
- """This subclasses BareCongig adding functions to make overriding |
25 |
+ """This subclasses BareConfig adding functions to make overriding |
26 |
or resetting defaults and/or setting options much easier |
27 |
by using dictionaries. |
28 |
""" |
29 |
@@ -340,7 +340,7 @@ class OptionConfig(BareConfig): |
30 |
if 'quiet' in keys: |
31 |
self.set_option('quiet', options['quiet']) |
32 |
options.pop('quiet') |
33 |
- if 'quietness' in keys and not options['quiet']: |
34 |
+ elif 'quietness' in keys: |
35 |
self._set_quietness(options['quietness']) |
36 |
options.pop('quietness') |
37 |
self._options.update(options) |