removed the multiline if condition as it seems unnecessary and also prevents the warning message (#66543)

* removed "this_dns_name" variable comparision with empty string.  #66537

* removed the imultiline if condition as it seems unnecessary.  #66537
pull/65665/merge
Na-Ne 5 years ago committed by GitHub
parent 717b7fee9f
commit c2ad25020b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save