Skip to content

Commit 967bf79

Browse files
committed
Fix error messages not displaying
1 parent df91b45 commit 967bf79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hb/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313

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

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

0 commit comments

Comments
 (0)