Declare is_failed_validation variable before if statement
Declare is_failed_validation variable before the if statement otherwise if results is None, we hit a 'reference before assignment' Change-Id: I293389c366fd49fbdde2ea55d3a3ebed1c598195
This commit is contained in:
parent
fba0312c49
commit
8edaf4ebbd
|
@ -421,13 +421,13 @@ class TripleOValidatorRun(command.Command):
|
|||
except RuntimeError as e:
|
||||
raise exceptions.CommandError(e)
|
||||
|
||||
is_failed_validation = False
|
||||
if results:
|
||||
# Build output
|
||||
t = PrettyTable(border=True, header=True, padding_width=1)
|
||||
# Set Field name by getting the result dict keys
|
||||
t.field_names = results[0].keys()
|
||||
t.align = 'l'
|
||||
is_failed_validation = False
|
||||
for r in results:
|
||||
if r.get('Status_by_Host'):
|
||||
h = []
|
||||
|
|
Loading…
Reference in New Issue