mirror of
https://opendev.org/x/pyghmi
synced 2025-01-29 12:27:37 +00:00
Fix py3 bytes mismatch for fromstring
Input comes in as bytes, we need to use bytes to match. Change-Id: I73730940569cd2647458ea9ed9401a9488bd9078
This commit is contained in:
parent
5db7eebe57
commit
7f1852aa0a
@ -45,7 +45,7 @@ SIZE_COMMAND = [0x06]
|
||||
|
||||
|
||||
def fromstring(inputdata):
|
||||
if '!entity' in inputdata:
|
||||
if b'!entity' in inputdata.lower():
|
||||
raise Exception('Unsupported XML')
|
||||
return etree.fromstring(inputdata)
|
||||
|
||||
|
@ -38,7 +38,7 @@ except NameError:
|
||||
|
||||
|
||||
def fromstring(inputdata):
|
||||
if '!entity' in inputdata.lower():
|
||||
if b'!entity' in inputdata.lower():
|
||||
raise Exception('!ENTITY not supported in this interface')
|
||||
return rfromstring(inputdata)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user