Skip to content

Commit 04ff4c1

Browse files
committed
assert that after assigning self.charEncoding it's not None
1 parent 3b7e017 commit 04ff4c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

html5lib/inputstream.py

+1
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
430430
# Detect encoding iff no explicit "transport level" encoding is supplied
431431
if (self.charEncoding[0] is None):
432432
self.charEncoding = self.detectEncoding(parseMeta, chardet)
433+
assert self.charEncoding[0] is not None
433434

434435
# Call superclass
435436
self.reset()

0 commit comments

Comments
 (0)