mirror of
https://opendev.org/x/pyghmi
synced 2026-04-01 15:53:32 +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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user