1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-14 06:38:36 +00: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
parent 1be6b25a0c
commit 8219698ade

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()