X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fparse_html_beautifulsoup.py;h=d73e4c313a62a67570eb190dac14d5198499ef1b;hb=a334a6e43f36642f4ffff7ebf0aec085a8545b2f;hp=5f010ad698e894e63d86515fa2a0111ad926da4d;hpb=4ad8953212582076957a8fe471d627528765dffa;p=bookmarks_db.git diff --git a/Robots/parse_html_beautifulsoup.py b/Robots/parse_html_beautifulsoup.py index 5f010ad..d73e4c3 100644 --- a/Robots/parse_html_beautifulsoup.py +++ b/Robots/parse_html_beautifulsoup.py @@ -55,7 +55,8 @@ def parse_html(filename, charset=None): root = BadDeclParser(infile, fromEncoding=charset) except TypeError: return None - infile.close() + finally: + infile.close() _charset = root.originalEncoding try: