1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 02:41:11 +01:00

output_processors/postgresql: Don't reconnect if not initialised

Update check to clarify that we should not attempt to reconnect to
the database if the initialisation of the output processor failed.
This commit is contained in:
Marc Bonnici 2019-08-28 11:22:35 +01:00 committed by setrofim
parent c1e095be51
commit 062be6d544

View File

@ -305,7 +305,7 @@ class PostgresqlResultProcessor(OutputProcessor):
''' A final export of the RunOutput that updates existing parameters
and uploads ones which are only generated after jobs have run.
'''
if not self.cursor: # Database did not connect correctly.
if self.cursor is None: # Output processor did not initialise correctly.
return
# Ensure we're still connected to the database.
self.connect_to_database()