Fixed exception handling with brother database

This commit is contained in:
Jacob Henry 2018-11-20 17:03:49 -05:00
parent a1c0573e09
commit 9d5cac2941
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ async def lookup_slackid_brother(slack_id: str) -> scroll_util.Brother:
try: try:
scroll = db[slack_id] scroll = db[slack_id]
return scroll_util.find_by_scroll(scroll) return scroll_util.find_by_scroll(scroll)
except ValueError: except (KeyError, ValueError):
raise scroll_util.BrotherNotFound("Slack id {} not tied to brother".format(slack_id)) raise scroll_util.BrotherNotFound("Slack id {} not tied to brother".format(slack_id))