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:
parent
c9ff15ca53
commit
452d91b2d6
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user