From c2ad25020b5fa2f334d61581fb936d3fa58c3280 Mon Sep 17 00:00:00 2001 From: Na-Ne Date: Sat, 15 Feb 2020 18:49:17 +0530 Subject: [PATCH] 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 --- contrib/inventory/cobbler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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