Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Sun, 01 May 2011 02:18:26
Message-Id: db3e6ddad1edf4b984abd49b23c35715614e733d.dol-sen@gentoo
1 commit: db3e6ddad1edf4b984abd49b23c35715614e733d
2 Author: dol-sen <brian.dolbec <AT> gmail <DOT> com>
3 AuthorDate: Sun May 1 02:18:21 2011 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Sun May 1 02:18:21 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=db3e6dda
7
8 fix --quiet option.
9
10 ---
11 layman/argsparser.py | 2 +-
12 layman/config.py | 6 +++---
13 layman/db.py | 7 ++++---
14 3 files changed, 8 insertions(+), 7 deletions(-)
15
16 diff --git a/layman/argsparser.py b/layman/argsparser.py
17 index 9b6aa91..aa31149 100644
18 --- a/layman/argsparser.py
19 +++ b/layman/argsparser.py
20 @@ -254,7 +254,7 @@ class ArgsParser(BareConfig):
21 self.read_config(self._defaults)
22
23 # handle quietness
24 - if self['quiet']:
25 + if self.options.__dict__['quiet']:
26 self.set_option('quiet', True)
27 elif self.options.__dict__['quietness']:
28 self.set_option('quietness', self.options.__dict__['quietness'])
29
30 diff --git a/layman/config.py b/layman/config.py
31 index 809ca8f..609b81e 100644
32 --- a/layman/config.py
33 +++ b/layman/config.py
34 @@ -178,15 +178,15 @@ class BareConfig(object):
35 if option == 'quiet':
36 if self._options['quiet']:
37 self._set_quietness(1)
38 - self._options['quietness'] = 0
39 + self._options['quietness'] = 1
40 else:
41 self._set_quietness(4)
42 if option == 'quietness':
43 self._set_quietness(value)
44
45 def _set_quietness(self, value):
46 - self._options['output'].set_info_level(int(self['quietness']))
47 - self._options['output'].set_warn_level(int(self['quietness']))
48 + self._options['output'].set_info_level(value)
49 + self._options['output'].set_warn_level(value)
50
51 def __getitem__(self, key):
52 return self._get_(key)
53
54 diff --git a/layman/db.py b/layman/db.py
55 index 6f79e26..0e581bd 100644
56 --- a/layman/db.py
57 +++ b/layman/db.py
58 @@ -312,8 +312,8 @@ class RemoteDB(DbBase):
59 except urllib2.HTTPError as e:
60 if e.getcode() == 304:
61 self.output.info('Remote list already up to date: %s'
62 - % url)
63 - self.output.info('Last-modified: %s' % timestamp)
64 + % url, 4)
65 + self.output.info('Last-modified: %s' % timestamp, 4)
66 else:
67 self.output.info('RemoteDB.cache(); HTTPError was:\n %s'
68 % str(e))
69 @@ -322,7 +322,8 @@ class RemoteDB(DbBase):
70 self.output.warn('Failed to update the overlay list from: '
71 + url + '\nError was:\n' + str(error))
72 else:
73 - self.output.info('Fetching new list...')
74 + self.output.info('Fetching new list... %s' % url, 4)
75 + self.output.info('Last-modified: %s' % timestamp, 4)
76 # Fetch the remote list
77 olist = connection.read()