commit 1d67ad6aac6f5ca7a49355a7caf2321db0142657
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Nov 3 09:22:50 2011 +0100
Fix the list --nameonly
pkgdb-cli.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pkgdb-cli.py b/pkgdb-cli.py
index 0c8262a..59a2905 100755
--- a/pkgdb-cli.py
+++ b/pkgdb-cli.py
@@ -411,14 +411,15 @@ def get_packages(motif=None, name_only=False,
branch='all'):
log.debug("collection map: {0}".format(collectn_map))
log.debug("status map: {0}".format(status_map))
- print pkgdbinfo['title']
+ if not name_only:
+ print pkgdbinfo['title']
cnt = 0
for pkg in pkgdbinfo['packages']:
out = " " + pkg['name'] + ' ' * (33 - \
len(pkg['name'])) + \
pkg['summary']
if name_only:
- out = " ", pkg['name']
+ out = " "+ pkg['name']
branches = []
for info in pkg['listings']:
@@ -430,7 +431,8 @@ def get_packages(motif=None, name_only=False, branch='all'):
if branch == 'all' or branch in branches:
print out
cnt = cnt + 1
- print 'Total: {0} packages'.format(cnt)
+ if not name_only:
+ print 'Total: {0} packages'.format(cnt)
def get_orphaned_packages(motif=None, eol=False, name_only=False,
Show replies by date