commit f2ee5284059847355849f4d0c780bf42a6b3dfff Author: Pierre-Yves Chibon pingou@pingoured.fr Date: Thu Jun 2 11:03:12 2011 +0200
Print error if message packageid could not be found for a branch
pkgdb.py | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) --- diff --git a/pkgdb.py b/pkgdb.py index 5a42f41..8ba69d8 100755 --- a/pkgdb.py +++ b/pkgdb.py @@ -186,12 +186,18 @@ def _retire_one_package(packagename, branch='devel', username=None,
if branch is None: branch = 'devel' + + log.info("Retiring package {0} on branch {2}".format(packagename, + branch)) + _get_client_authentified(username=username, password=password) packageid = _get_package_id(packagename, branch)
- log.info("Retiring package {0} ({1}) on branch {2}".format(packagename, - packageid, - branch)) + if packageid is None: + print "Cannot retire package {0} on branch {1}, "\ + "package ID could not be found".format(packagename, + branch) + return
pkgdbinfo = pkgdbclient.send_request( '/acls/dispatcher/toggle_retirement',
packagedb-cli-commits@lists.stg.fedorahosted.org