Bugfix: "or None" is useless

"or None" would assign if the first term is false-y. But not specifying
it would already lead to the variable being set to None.
This commit is contained in:
Robert Schmidt
2025-10-28 09:32:32 +01:00
parent b0106f27b5
commit 19c6d20b45

View File

@@ -166,7 +166,7 @@ def ExecuteActionWithParam(action, ctx, node):
CiTestObj.ping_args = test.findtext('ping_args')
CiTestObj.ping_packetloss_threshold = test.findtext('ping_packetloss_threshold')
CiTestObj.ue_ids = test.findtext('id').split(' ')
CiTestObj.svr_id = test.findtext('svr_id') or None
CiTestObj.svr_id = test.findtext('svr_id')
if test.findtext('svr_node'):
CiTestObj.svr_node = test.findtext('svr_node') if not force_local else 'localhost'
ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or ''
@@ -175,7 +175,7 @@ def ExecuteActionWithParam(action, ctx, node):
elif action == 'Iperf' or action == 'Iperf2_Unidir':
CiTestObj.iperf_args = test.findtext('iperf_args')
CiTestObj.ue_ids = test.findtext('id').split(' ')
CiTestObj.svr_id = test.findtext('svr_id') or None
CiTestObj.svr_id = test.findtext('svr_id')
if test.findtext('svr_node'):
CiTestObj.svr_node = test.findtext('svr_node') if not force_local else 'localhost'
CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold')