From e7e286fbf3c7e7368e8462348986a57d096e100d Mon Sep 17 00:00:00 2001 From: MasterofJOKers Date: Tue, 20 Sep 2022 22:56:37 +0200 Subject: [PATCH] Support not having [filters] in config Not everybody might have a default_project set ... --- jiracli/cli.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jiracli/cli.py b/jiracli/cli.py index aa9eb70..90b057a 100644 --- a/jiracli/cli.py +++ b/jiracli/cli.py @@ -103,10 +103,8 @@ def version(client): @pass_client @pass_config def issues(config, client, project, components, status, labels, texts, flagged, order, asc, jql): - filters_config = config['filters'] - - if not project and filters_config and 'default_project' in filters_config: - project = filters_config['default_project'] + if not project and config.has_section('filters') and config.get('filters', 'default_project'): + project = config['filters']['default_project'] project_jql = f"project = {project}" # TODO add filtering by created since