mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 21:31:26 -07:00
More isinstance fixes (#3405)
* More isinstance fixes * Use double types
This commit is contained in:
parent
32fef233f2
commit
b3795322e9
3 changed files with 7 additions and 7 deletions
|
@ -504,13 +504,13 @@ class Nmcli(object):
|
|||
val=d[key]
|
||||
str_val=""
|
||||
add_string=True
|
||||
if type(val)==type(dbus.Array([])):
|
||||
if isinstance(val, dbus.Array):
|
||||
for elt in val:
|
||||
if type(elt)==type(dbus.Byte(1)):
|
||||
if isinstance(elt, dbus.Byte):
|
||||
str_val+="%s " % int(elt)
|
||||
elif type(elt)==type(dbus.String("")):
|
||||
elif isinstance(elt, dbus.String):
|
||||
str_val+="%s" % elt
|
||||
elif type(val)==type(dbus.Dictionary({})):
|
||||
elif isinstance(val, dbus.Dictionary):
|
||||
dstr+=self.dict_to_string(val)
|
||||
add_string=False
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue