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:
parent
9d0d1b2dd7
commit
7fc39379c9
1 changed files with 1 additions and 1 deletions
|
@ -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"]:
|
||||
|
|
Loading…
Reference in a new issue