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

Lines changed: 1 addition & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy