mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-16 18:49:04 +00:00
Tolerate multiple forms of 'stringy'
The fromstring needs to accept either, so amend it to do so.
This commit is contained in:
parent
8df15b3a54
commit
6458eac93b
@ -30,7 +30,11 @@ getaddrinfo = eventlet.support.greendns.getaddrinfo
|
||||
from xml.etree.ElementTree import fromstring as rfromstring
|
||||
|
||||
def fromstring(inputdata):
|
||||
if '!entity' in inputdata.lower():
|
||||
if isinstance(inputdata, bytes):
|
||||
cmpstr = b'!entity'
|
||||
else:
|
||||
cmpstr = '!entity'
|
||||
if cmpstr in inputdata.lower():
|
||||
raise Exception('!ENTITY not supported in this interface')
|
||||
return rfromstring(inputdata)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user