diff --git a/contrib/inventory/cobbler.py b/contrib/inventory/cobbler.py index a3b94b7a967..60195ac1979 100755 --- a/contrib/inventory/cobbler.py +++ b/contrib/inventory/cobbler.py @@ -215,8 +215,7 @@ class CobblerInventory(object): for (iname, ivalue) in iteritems(interfaces): if ivalue['management'] or not ivalue['static']: this_dns_name = ivalue.get('dns_name', None) - if this_dns_name is not None and this_dns_name is not "": - dns_name = this_dns_name + dns_name = this_dns_name if this_dns_name else '' if dns_name == '' or dns_name is None: continue