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
This commit is contained in:
Na-Ne 2020-02-15 18:49:17 +05:30 committed by GitHub
parent 717b7fee9f
commit c2ad25020b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,8 +215,7 @@ class CobblerInventory(object):
for (iname, ivalue) in iteritems(interfaces): for (iname, ivalue) in iteritems(interfaces):
if ivalue['management'] or not ivalue['static']: if ivalue['management'] or not ivalue['static']:
this_dns_name = ivalue.get('dns_name', None) 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 if this_dns_name else ''
dns_name = this_dns_name
if dns_name == '' or dns_name is None: if dns_name == '' or dns_name is None:
continue continue