summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@users.noreply.github.com>2018-12-24 20:08:50 -0600
committerGitHub <noreply@github.com>2018-12-24 20:08:50 -0600
commitd5cce29645b3f25526313210485e5ce7096dec63 (patch)
treee7f9404d6d5675308f61e5f26acaaced6e66557f /examples
parent7ee59bf9bec777b5a3f627dc2cfbde637ce9ebfc (diff)
parentdf9b2d50b75ee42663195058f3112e6c440381c5 (diff)
downloadpyparsing-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.py2
-rw-r--r--examples/dfmparse.py2
-rw-r--r--examples/pythonGrammarParser.py2
-rw-r--r--examples/verilogParse.py4
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