aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-03-24 10:53:33 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-03-24 10:53:33 +0100
commit7c69a61c7db9d75d5bee3529533295bba37779ab (patch)
treefeca9f8f33b068dff9528f2fd4b03062b9d5545a /vnfs
parentb8c5101a920275687fdab980048cb4dae5aa902d (diff)
Do not use `len(SEQUENCE)` to determine if a sequence is empty
Change-Id: Iad6832e7b9d468bc8ce73cb728bb983941f7a61c Issue-ID: INT-1482 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'vnfs')
-rw-r--r--vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py5
-rw-r--r--vnfs/VES5.0/evel/evel-test-collector/code/collector/test_control.py4
2 files changed, 4 insertions, 5 deletions
diff --git a/vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py b/vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py
index 6fadd46f..6565e43a 100644
--- a/vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py
+++ b/vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py
@@ -526,7 +526,7 @@ USAGE
raise RuntimeError('Invalid Vendor Event Listener port ({0}) '
'specified'.format(vel_port))
- if (len(vel_path) > 0 and vel_path[-1] != '/'):
+ if (vel_path and vel_path[-1] != '/'):
logger.warning('Event Listener Path ({0}) should have terminating '
'"/"! Adding one on to configured string.'.format(
vel_path))
@@ -590,8 +590,7 @@ USAGE
format(vel_path,
api_version,
'/' + vel_topic_name
- if len(vel_topic_name) > 0
- else '')
+ if vel_topic_name else '')
throttle_url = '/{0}eventListener/v{1}/clientThrottlingState'.\
format(vel_path, api_version)
batch_url = '/{0}eventListener/v{1}/eventBatch'.\
diff --git a/vnfs/VES5.0/evel/evel-test-collector/code/collector/test_control.py b/vnfs/VES5.0/evel/evel-test-collector/code/collector/test_control.py
index 72f53fb2..5d7394e1 100644
--- a/vnfs/VES5.0/evel/evel-test-collector/code/collector/test_control.py
+++ b/vnfs/VES5.0/evel/evel-test-collector/code/collector/test_control.py
@@ -43,9 +43,9 @@ def command_interval(interval):
def command_throttle(domain, fields, pairs):
"return a throttlingSpecification"
throttle_spec = {'eventDomain' : domain}
- if len(fields):
+ if fields:
throttle_spec['suppressedFieldNames'] = fields
- if len(pairs):
+ if pairs:
throttle_spec['suppressedNvPairsList'] = pairs
return {'command':
{'commandType': 'throttlingSpecification',