diff options
-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 | ||||
-rw-r--r-- | unitTests.py | 8 |
5 files changed, 9 insertions, 9 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
diff --git a/unitTests.py b/unitTests.py index 7dcc237..851a98a 100644 --- a/unitTests.py +++ b/unitTests.py @@ -850,7 +850,7 @@ class ParseKeywordTest(ParseTestCase): print_("Match Literal", end=' ')
try:
print_(lit.parseString(s))
- except:
+ except Exception:
print_("failed")
if litShouldPass:
self.assertTrue(False, "Literal failed to match %s, should have" % s)
@@ -861,7 +861,7 @@ class ParseKeywordTest(ParseTestCase): print_("Match Keyword", end=' ')
try:
print_(kw.parseString(s))
- except:
+ except Exception:
print_("failed")
if kwShouldPass:
self.assertTrue(False, "Keyword failed to match %s, should have" % s)
@@ -3939,10 +3939,10 @@ class MiscellaneousParserTests(ParseTestCase): print_(t, repr(t))
try:
names.append( t[0].getName() )
- except:
+ except Exception:
try:
names.append( t.getName() )
- except:
+ except Exception:
names.append( None )
print_(teststring)
print_(names)
|