From f75ce1ff74f97d0e152d08e36b0efe096d6bfca5 Mon Sep 17 00:00:00 2001 From: Luke Macken Date: Tue, 18 Aug 2015 12:16:49 -0600 Subject: [PATCH 2/2] cli: Get the queries working against bodhi2 diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py index 9db535e..1296671 100755 --- a/bodhi/tools/client.py +++ b/bodhi/tools/client.py @@ -468,11 +468,12 @@ def main(): if 'tg_flash' in data and data['tg_flash']: log.error(data['tg_flash']) sys.exit(-1) - if data['num_items'] > 1: + total = data.get('num_items', data.get('total', 0)) + if total > 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']))) + total, len(data['updates']))) else: for update in data['updates']: print(bodhi.update_str(update).encode("UTF-8")) -- 2.4.3