8000 fix: matching wrong pattern causes ValueError instead skipping pattern · FirebirdSQL/python3-lib@cdaa005 · GitHub
[go: up one dir, main page]

Skip to content
65FA

Commit cdaa005

Browse files
committed
fix: matching wrong pattern causes ValueError instead skipping pattern
1 parent f452129 commit cdaa005

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

firebird/lib/logmsgs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,11 @@ def identify_msg(msg: str) -> Optional[Tuple[MsgDesc, Dict[str, Any], bool]]:
10241024
p_value = value_str
10251025
p_format, p_name = chunk[1:-1].split(':')
10261026
if p_format == 'd':
1027-
p_value = int(p_value)
1027+
try:
1028+
p_value = int(p_value)
1029+
except ValueError:
1030+
# wrong pattern?
1031+
break
10281032
#
10291033
params[p_name] = p_value
10301034
i += 1

0 commit comments

Comments
 (0)
0