Skip to content

Commit

Permalink
simplying json code path
Browse files Browse the repository at this point in the history
  • Loading branch information
geier committed Oct 30, 2023
1 parent 5dbad2b commit c78bade
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions khal/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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']))
Expand Down

0 comments on commit c78bade

Please sign in to comment.