vmware_inventory: decode strings to ascii if not alphanumeric (#17618)
Fixes #17281
This commit is contained in:
parent
794c1636eb
commit
66426dcd38
1 changed files with 4 additions and 1 deletions
|
@ -487,7 +487,10 @@ class VMWareInventory(object):
|
||||||
if vobj is None:
|
if vobj is None:
|
||||||
rdata = None
|
rdata = None
|
||||||
elif issubclass(type(vobj), str) or isinstance(vobj, str):
|
elif issubclass(type(vobj), str) or isinstance(vobj, str):
|
||||||
rdata = vobj
|
if vobj.isalnum():
|
||||||
|
rdata = vobj
|
||||||
|
else:
|
||||||
|
rdata = vobj.decode('ascii', 'ignore')
|
||||||
elif issubclass(type(vobj), bool) or isinstance(vobj, bool):
|
elif issubclass(type(vobj), bool) or isinstance(vobj, bool):
|
||||||
rdata = vobj
|
rdata = vobj
|
||||||
elif issubclass(type(vobj), int) or isinstance(vobj, int):
|
elif issubclass(type(vobj), int) or isinstance(vobj, int):
|
||||||
|
|
Loading…
Reference in a new issue