Skip to content

Commit dbeeacc

Browse files
jdufresnegsnedders
authored andcommitted
Remove unnecessary/empty try/except construct
The exception is caught and always re-raised without any additional action. Simply let the original exception bubble up instead.
1 parent 7fea68a commit dbeeacc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

html5lib/html5parser.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,7 @@ def log(function):
418418
def wrapped(self, *args, **kwargs):
419419
if function.__name__.startswith("process") and len(args) > 0:
420420
token = args[0]
421-
try:
422-
info = {"type": type_names[token['type']]}
423-
except:
424-
raise
421+
info = {"type": type_names[token['type']]}
425422
if token['type'] in tagTokenTypes:
426423
info["name"] = token['name']
427424

0 commit comments

Comments
 (0)