2
0
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:
Jarrod Johnson 2021-01-22 12:39:39 -05:00
parent 5db7eebe57
commit 7f1852aa0a
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)