Skip to content

Commit

Permalink
Merge pull request #2435 from mdboom/pyparsing-monkeypatch-check-for-…
Browse files Browse the repository at this point in the history
…typeerror

Explicitly catch TypeError when doing pyparsing monkeypatch check
  • Loading branch information
pelson committed Sep 20, 2013
2 parents 88c49a9 + 8d88c7d commit 2f6b117
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Expand Up @@ -134,7 +134,7 @@ def compare_versions(a, b):
f = pyparsing.Forward()
f <<= pyparsing.Literal('a')
bad_pyparsing = f is None
except:
except TypeError:
bad_pyparsing = True

# pyparsing 1.5.6 does not have <<= on the Forward class, but
Expand Down
2 changes: 1 addition & 1 deletion setupext.py
Expand Up @@ -1018,7 +1018,7 @@ def is_ok(self):
f = pyparsing.Forward()
f <<= pyparsing.Literal('a')
return f is not None
except:
except TypeError:
return False

def check(self):
Expand Down

0 comments on commit 2f6b117

Please sign in to comment.