8000 Merge pull request #2435 from mdboom/pyparsing-monkeypatch-check-for-… · unutbu/matplotlib@2f6b117 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f6b117

Browse files
committed
Merge pull request matplotlib#2435 from mdboom/pyparsing-monkeypatch-check-for-typeerror
Explicitly catch TypeError when doing pyparsing monkeypatch check
2 parents 88c49a9 + 8d88c7d commit 2f6b117

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def compare_versions(a, b):
134134
f = pyparsing.Forward()
135135
f <<= pyparsing.Literal('a')
136136
bad_pyparsing = f is None
137-
except:
137+
except TypeError:
138138
bad_pyparsing = True
139139

140140
# pyparsing 1.5.6 does not have <<= on the Forward class, but

setupext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ def is_ok(self):
10181018
f = pyparsing.Forward()
10191019
f <<= pyparsing.Literal('a')
10201020
return f is not None
1021-
except:
1021+
except TypeError:
10221022
return False
10231023

10241024
def check(self):

0 commit comments

Comments
 (0)
0