Fixed failed ip address validation under Python 2 due to unicode string not being specified
diff --git a/DataSourceVMwareGuestInfo.py b/DataSourceVMwareGuestInfo.py
index 12a614d..19d20a2 100644
--- a/DataSourceVMwareGuestInfo.py
+++ b/DataSourceVMwareGuestInfo.py
@@ -573,7 +573,7 @@
try:
addr = ipaddress.ip_address(val)
except ipaddress.AddressValueError:
- addr = ipaddress.ip_address(val.encode('utf-8'))
+ addr = ipaddress.ip_address(unicode(val))
except:
return False
if addr.is_link_local or addr.is_loopback or addr.is_unspecified: