Skip to content

Commit ce3c77c

Browse files
author
Rémi Lapeyre
committed
Simplify error checking using Zackery Spytz suggestion
1 parent cbd71fa commit ce3c77c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parser/asdl_c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ def visitModule(self, mod):
702702
while (PyDict_Next(kw, &i, &key, &value)) {
703703
PyObject* pos = _PyObject_FastCallDict(index, &key, 1, NULL);
704704
PyObject* err = PyErr_Occurred();
705-
if (pos == NULL || err != NULL) {
705+
if (pos == NULL) {
706706
// arbitrary keyword arguments are accepted
707707
if (!PyErr_GivenExceptionMatches(err, PyExc_ValueError)) {
708708
res = -1;

0 commit comments

Comments
 (0)