diff options
author | Paul McGuire <ptmcg@users.noreply.github.com> | 2018-12-24 20:08:50 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-24 20:08:50 -0600 |
commit | d5cce29645b3f25526313210485e5ce7096dec63 (patch) | |
tree | e7f9404d6d5675308f61e5f26acaaced6e66557f /examples | |
parent | 7ee59bf9bec777b5a3f627dc2cfbde637ce9ebfc (diff) | |
parent | df9b2d50b75ee42663195058f3112e6c440381c5 (diff) | |
download | pyparsing-git-d5cce29645b3f25526313210485e5ce7096dec63.tar.gz |
Merge pull request #58 from jdufresne/bare-except
Replace bare 'except:' with 'except Exception;'
Diffstat (limited to 'examples')
-rw-r--r-- | examples/LAparser.py | 2 | ||||
-rw-r--r-- | examples/dfmparse.py | 2 | ||||
-rw-r--r-- | examples/pythonGrammarParser.py | 2 | ||||
-rw-r--r-- | examples/verilogParse.py | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/examples/LAparser.py b/examples/LAparser.py index 3714975..41e8b4f 100644 --- a/examples/LAparser.py +++ b/examples/LAparser.py @@ -404,7 +404,7 @@ if __name__ == '__main__': else:
try:
print(parse(input_string))
- except:
+ except Exception:
pass
# obtain new input string
diff --git a/examples/dfmparse.py b/examples/dfmparse.py index d77a7ff..ae74bf0 100644 --- a/examples/dfmparse.py +++ b/examples/dfmparse.py @@ -161,7 +161,7 @@ def main(testfiles=None, action=printer): try:
retval[f] = object_definition.parseFile(f)
success += 1
- except:
+ except Exception:
failures.append(f)
if failures:
diff --git a/examples/pythonGrammarParser.py b/examples/pythonGrammarParser.py index aed6bbe..ed6a484 100644 --- a/examples/pythonGrammarParser.py +++ b/examples/pythonGrammarParser.py @@ -170,7 +170,7 @@ def makeGroupObject(cls): def groupAction(s,l,t):
try:
return cls(t[0].asList())
- except:
+ except Exception:
return cls(t)
return groupAction
diff --git a/examples/verilogParse.py b/examples/verilogParse.py index 9477e38..da97286 100644 --- a/examples/verilogParse.py +++ b/examples/verilogParse.py @@ -81,7 +81,7 @@ psycoOn = False if usePackrat:
try:
ParserElement.enablePackrat()
- except:
+ except Exception:
pass
else:
packratOn = True
@@ -91,7 +91,7 @@ if usePsyco: try:
import psyco
psyco.full()
- except:
+ except Exception:
print("failed to import psyco Python optimizer")
else:
psycoOn = True
|