Check for existance of key in dictionary

as well as non-null value to avoid uncaught KeyError

re: issue #116
This commit is contained in:
Your Name 2019-09-07 18:48:11 +00:00 committed by Ivan Habunek
parent 9d0d1b2dd7
commit 7fc39379c9
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ class StatusDetails(urwid.Pile):
def card_generator(self, card):
yield urwid.Text(("green", card["title"].strip()))
if card["author_name"]:
if card.get("author_name"):
yield urwid.Text(["by ", ("yellow", card["author_name"].strip())])
yield urwid.Text("")
if card["description"]: