Skip to content

Commit

Permalink
google calendar: fix a crash when summary is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
David R. Andersen authored and David R. Andersen committed Jan 6, 2016
1 parent dbae6a2 commit c9d5003
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libqtile/widget/google_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ def poll(self):
event['start']['dateTime'].replace('T', ' ')
)

data = event['summary'] + ' ' + time
try:
data = event['summary'] + ' ' + time
except KeyError:
data = 'Event summary not specified in calendar ' + time

# colorize the event if it is upcoming
parse_result = dateutil.parser.parse(event['start']['dateTime'], ignoretz=True)
Expand Down

0 comments on commit c9d5003

Please sign in to comment.