Fix issue where unicode aren't interpreted as custom fields in host
Change-Id: I829476e161f9bec9d8ee8326cf559e9203385779
This commit is contained in:
parent
576f26a08c
commit
855f94eb85
|
@ -56,7 +56,10 @@ class Host(types.Base):
|
|||
|
||||
# Custom fields start with '_'. Detect them ans assign them.
|
||||
custom_fields = [i for i in kwargs.items()
|
||||
if isinstance(i[0], str) and i[0][0] == '_']
|
||||
if (isinstance(i[0], str)
|
||||
or isinstance(i[0], unicode))
|
||||
and i[0][0] == '_']
|
||||
|
||||
if len(custom_fields) > 0:
|
||||
self.custom_fields = {}
|
||||
for item in custom_fields:
|
||||
|
|
Loading…
Reference in New Issue