From b921489d8d296684e94d0ab86b72eaa6095265b2 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Dec 08 2020 11:51:29 +0000 Subject: cli: some options are not supplied in all _list_tasks calls Fixes: https://pagure.io/koji/issue/2585 --- diff --git a/cli/koji_cli/lib.py b/cli/koji_cli/lib.py index 6234234..76d6d9a 100644 --- a/cli/koji_cli/lib.py +++ b/cli/koji_cli/lib.py @@ -757,12 +757,12 @@ def _list_tasks(options, session): callopts = { 'decode': True, } - if not options.all: + if not getattr(options, 'all', False): callopts['state'] = [koji.TASK_STATES[s] for s in ('FREE', 'OPEN', 'ASSIGNED')] - if options.after: + if getattr(options, 'after', False): callopts['startedAfter'] = options.after - if options.before: + if getattr(options, 'before', False): callopts['startedBefore'] = options.before if getattr(options, 'mine', False):