1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-22 12:58:36 +00:00

output_processors/sqlite: Fix incorrect error type and import

This commit is contained in:
Marc Bonnici 2018-07-03 14:11:44 +01:00 committed by setrofim
parent c9ff15ca53
commit 452d91b2d6

View File

@ -22,6 +22,7 @@ from datetime import datetime, timedelta
from contextlib import contextmanager from contextlib import contextmanager
from wa import OutputProcessor, Parameter, OutputProcessorError from wa import OutputProcessor, Parameter, OutputProcessorError
from wa.framework.exception import OutputProcessorError
from wa.utils.serializer import json from wa.utils.serializer import json
from wa.utils.types import boolean from wa.utils.types import boolean
@ -175,10 +176,10 @@ class SqliteResultProcessor(OutputProcessor):
found_version = c.fetchone()[0] found_version = c.fetchone()[0]
except sqlite3.OperationalError: except sqlite3.OperationalError:
message = '{} does not appear to be a valid WA results database.'.format(self.database) message = '{} does not appear to be a valid WA results database.'.format(self.database)
raise ResultProcessorError(message) raise OutputProcessorError(message)
if found_version != SCHEMA_VERSION: if found_version != SCHEMA_VERSION:
message = 'Schema version in {} ({}) does not match current version ({}).' message = 'Schema version in {} ({}) does not match current version ({}).'
raise ResultProcessorError(message.format(self.database, found_version, SCHEMA_VERSION)) raise OutputProcessorError(message.format(self.database, found_version, SCHEMA_VERSION))
def _update_run(self, run_uuid): def _update_run(self, run_uuid):
with self._open_connection() as conn: with self._open_connection() as conn: