From c78bade73c83798049812bc522606c46e94574af Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 31 Oct 2023 00:28:23 +0100 Subject: [PATCH] simplying json code path --- khal/controllers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/khal/controllers.py b/khal/controllers.py index a850b33c8..acedf9c09 100644 --- a/khal/controllers.py +++ b/khal/controllers.py @@ -255,8 +255,7 @@ def khal_list( if agenda_format is None: agenda_format = conf['view']['agenda_event_format'] - json_mode = json is not None and len(json) > 0 - if json_mode: + if json: formatter = json_formatter(json) colors = False else: @@ -313,7 +312,7 @@ def khal_list( seen=once, colors=colors, ) - if day_format and (conf['default']['show_all_days'] or current_events) and not json_mode: + if day_format and (conf['default']['show_all_days'] or current_events) and not json: if len(event_column) != 0 and conf['view']['blank_line_before_day']: event_column.append('') event_column.append(format_day(start.date(), day_format, conf['locale']))