From be680652d79e4f50ce6604c09cb7db32038c5647 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 23 2016 10:05:05 +0000 Subject: Handle the situation where the unretirement request didn't include a review --- diff --git a/pkgdb2client/admin.py b/pkgdb2client/admin.py index 0744fb1..0488ca2 100644 --- a/pkgdb2client/admin.py +++ b/pkgdb2client/admin.py @@ -454,8 +454,14 @@ def __handle_request_unretire(actionid, action): action['info']['pkg_namespace'] = action['package'].get( 'namespace', 'rpms') - msgs = utils.check_package_creation( - action['info'], bugid, PKGDBCLIENT, action['user']) + if bugid: + msgs = utils.check_package_creation( + action['info'], bugid, PKGDBCLIENT, action['user']) + else: + msgs = { + "bad": ['No review specified, retirement recent enough?'], + 'good': [] + } bugid = utils.get_bug_id_from_url(action['info']['pkg_review_url']) decision = _ask_what_to_do(msgs)