With these changes one can obtain an
easy to parse tabular display for
a set of packges.
* with -T, display the expanded package info
when --verbose is specified, not vice versa.
* In general show the minimal listing
for a package unless --verbose is specified.
* Don't bother outputting "X updates found (Y shown)",
in the common case when X and Y are the same.
---
bodhi/tools/client.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index e9603d0..a6e6029 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -351,7 +351,7 @@ def main():
if opts.type_:
if not update['type'] == opts.type_:
continue
- print(bodhi.update_str(update, minimal=opts.verbose).encode("UTF-8"))
+ print(bodhi.update_str(update, minimal=not opts.verbose).encode("UTF-8"))
elif opts.candidates:
for build in bodhi.candidates():
@@ -461,11 +461,12 @@ def main():
if data['num_items'] > 1:
for update in data['updates']:
print(bodhi.update_str(update, minimal=True).encode("UTF-8"))
- log.info("%d updates found (%d shown)" % (
- data['num_items'], len(data['updates'])))
+ if opts.verbose or (data['num_items'] != len(data['updates'])):
+ log.info("%d updates found (%d shown)" % (
+ data['num_items'], len(data['updates'])))
else:
for update in data['updates']:
- print(bodhi.update_str(update).encode("UTF-8"))
+ print(bodhi.update_str(update, minimal=not opts.verbose).encode("UTF-8"))
if args:
for arg in args:
data = bodhi.query(package=arg, release=opts.release,
--
1.7.6.4