diff options
author | jctanner <tanner.jc@gmail.com> | 2016-11-09 15:25:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-09 15:25:17 -0500 |
commit | f941dbd143745f87d320a61b984ce99db44581b3 (patch) | |
tree | 3ec59c87ad05e8fd6d6dc9823f195d52abc3b92b /network | |
parent | 7ca4e0fbebebc194a3842afe44fca5481fcb1ae8 (diff) | |
download | ansible-modules-extras-f941dbd143745f87d320a61b984ce99db44581b3.tar.gz |
More isinstance fixes (#3405)
* More isinstance fixes
* Use double types
Diffstat (limited to 'network')
-rw-r--r-- | network/nmcli.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/network/nmcli.py b/network/nmcli.py index 8078e9da..00bab417 100644 --- a/network/nmcli.py +++ b/network/nmcli.py @@ -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: |