File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -728,19 +728,20 @@ def handleMeta(self):
728
728
if attr is None :
729
729
return True
730
730
else :
731
- if attr [0 ] == b"http-equiv" :
732
- hasPragma = attr [1 ] == b"content-type"
731
+ name , value = attr
732
+ if name == b"http-equiv" :
733
+ hasPragma = value == b"content-type"
733
734
if hasPragma and pendingEncoding is not None :
734
735
self .encoding = pendingEncoding
735
736
return False
736
- elif attr [ 0 ] == b"charset" :
737
- tentativeEncoding = attr [ 1 ]
737
+ elif name == b"charset" :
738
+ tentativeEncoding = value
738
739
codec = lookupEncoding (tentativeEncoding )
739
740
if codec is not None :
740
741
self .encoding = codec
741
742
return False
742
- elif attr [ 0 ] == b"content" :
743
- contentParser = ContentAttrParser (EncodingBytes (attr [ 1 ] ))
743
+ elif name == b"content" :
744
+ contentParser = ContentAttrParser (EncodingBytes (value ))
744
745
tentativeEncoding = contentParser .parse ()
745
746
if tentativeEncoding is not None :
746
747
codec = lookupEncoding (tentativeEncoding )
You can’t perform that action at this time.
0 commit comments