Fix regression in pyparsing 3.1.1
See the following link for further details: https://github.com/eerimoq/asn1tools/issues/167 Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
parent
70917da7f3
commit
48b3f1f261
@ -0,0 +1,20 @@
|
|||||||
|
From: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
|
||||||
|
Date: Sat, 13 Jan 2024 05:04:57 +0000
|
||||||
|
Subject: [PATCH] Avoid assigning an empty error message to delegated parse
|
||||||
|
exception
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/pyparsing/core.py b/pyparsing/core.py
|
||||||
|
index 73514ed..fc19d1c 100644
|
||||||
|
--- a/pyparsing/core.py
|
||||||
|
+++ b/pyparsing/core.py
|
||||||
|
@@ -4569,7 +4569,8 @@ class ParseElementEnhance(ParserElement):
|
||||||
|
return self.expr._parse(instring, loc, doActions, callPreParse=False)
|
||||||
|
except ParseBaseException as pbe:
|
||||||
|
if not isinstance(self, Forward) or self.customName is not None:
|
||||||
|
- pbe.msg = self.errmsg
|
||||||
|
+ if self.errmsg:
|
||||||
|
+ pbe.msg = self.errmsg
|
||||||
|
raise
|
||||||
|
else:
|
||||||
|
raise ParseException(instring, loc, "No expression defined", self)
|
@ -7,7 +7,7 @@ Release: %autorelease
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/pyparsing/pyparsing
|
URL: https://github.com/pyparsing/pyparsing
|
||||||
Source0: https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch1: pyparsing-0001-Avoid-assigning-an-empty-error-message-to-delegated-.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: dos2unix
|
BuildRequires: dos2unix
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user