Skip to content

Commit

Permalink
Fix error messages not displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
chingc committed Aug 2, 2018
1 parent df91b45 commit 967bf79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hb/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@


def _shorten(error: Exception) -> str:
return str(error).partition("] ")[-1]
msg = str(error)
return msg.partition("] ")[-1] if "] " in msg else msg

def _compute(algorithm: str, path: str, given: str) -> Tuple[int, str]:
try:
Expand Down

0 comments on commit 967bf79

Please sign in to comment.