Handle case where metadata file list is empty
This patch short circuits the if statement so that the script doesnt fail when the list of metadata files is empty. Change-Id: Iecf7c0bc9104aa51c3f22f48b696ec261384ca3b Closes-Bug: #1605390
This commit is contained in:
parent
381e0204e4
commit
9186002e25
@ -62,7 +62,8 @@ class Elastic:
|
||||
"""
|
||||
|
||||
def combine_metadata(self, result):
|
||||
if len(self.config['elasticsearch']['metadata_files']) > 0:
|
||||
if (self.config['elasticsearch']['metadata_files'] is not None and
|
||||
len(self.config['elasticsearch']['metadata_files']) > 0):
|
||||
meta = self.config['elasticsearch']['metadata_files']
|
||||
for _meta in meta:
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user