bodhi/tools/client.py | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit cbe9542df72e2b1e1981230dd40cb43f29a3412f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu May 7 14:17:23 2009 -0400
Patch from Josh Boyer to allow specifying a type of update to push with -P (#302).
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index e06b841..89a4f2d 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -47,6 +47,9 @@ def get_parser():
help="Display the status of the Masher (releng only)")
parser.add_option("-P", "--push", action="store_true",
dest="push",
help="Display and push any pending updates (releng
only)")
+ parser.add_option("--push-type", action="append",
type="string",
+ dest="push_type",
+ help="Types of updates to push (releng only)")
parser.add_option("-d", "--delete",
action="store_true", dest="delete",
help="Delete an update")
parser.add_option("", "--file", action="store",
type="string",
@@ -187,11 +190,19 @@ def main():
if not data.get('updates', None):
log.info(data.get('message', 'Unknown masher
reply'))
raise AuthError
+ if opts.push_type:
+ fupdates = []
+ for ptype in opts.push_type:
+ fdata = filter(lambda x: x['type'] == ptype,
+ data['updates'])
+ fupdates += fdata
+ data['updates'] = fupdates
log.debug(data)
log.info("[ %d Pending Requests ]" %
len(data['updates']))
for status in ('testing', 'stable', 'obsolete'):
updates = filter(lambda x: x['request'] == status,
data['updates'])
+
releases = {}
for update in updates:
releases.setdefault(update['release']['name'],
[]) \
Show replies by date