diff --git a/lib/galaxy/job_execution/ports/view.py b/lib/galaxy/job_execution/ports/view.py index 93cf58ddeb9..b84955e08c2 100644 --- a/lib/galaxy/job_execution/ports/view.py +++ b/lib/galaxy/job_execution/ports/view.py @@ -1,10 +1,10 @@ import logging from galaxy import ( - exceptions, model, util ) +from galaxy.exceptions import ItemAccessibilityException, ObjectAttributeMissingException log = logging.getLogger(__name__) @@ -26,19 +26,19 @@ class JobPortsView: key = "job_key" if key not in kwargs: error_message = "Job files action requires a valid '%s'." % key - raise exceptions.ObjectAttributeMissingException(error_message) + raise ObjectAttributeMissingException(error_message) job_id = self._security.decode_id(encoded_job_id) job_key = self._security.encode_id(job_id, kind="jobs_files") if not util.safe_str_cmp(kwargs["job_key"], job_key): - raise exceptions.ItemAccessibilityException("Invalid job_key supplied.") + raise ItemAccessibilityException("Invalid job_key supplied.") # Verify job is active. Don't update the contents of complete jobs. sa_session = self._app.model.context.current job = sa_session.query(model.Job).get(job_id) if not job.running: error_message = "Attempting to read or modify the files of a job that has already completed." - raise exceptions.ItemAccessibilityException(error_message) + raise ItemAccessibilityException(error_message) return job @property diff --git a/packages/job_execution/galaxy/__init__.py b/packages/job_execution/galaxy/__init__.py index 69e3be50dac..0d1f7edf5dc 100644 --- a/packages/job_execution/galaxy/__init__.py +++ b/packages/job_execution/galaxy/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore diff --git a/packages/test.sh b/packages/test.sh index e2b476e47b7..4ea27157293 100755 --- a/packages/test.sh +++ b/packages/test.sh @@ -34,7 +34,7 @@ PACKAGE_DIRS=( # tool_util not yet working 100%, # data has many problems quota, tool shed install database, etc.. RUN_TESTS=(1 1 1 1 1 1 1 1 1 1 0 0) -RUN_MYPY=(1 1 1 1 1 1 0 0 0 0 0 0) +RUN_MYPY=(1 1 1 1 1 1 1 0 0 0 0 0) for ((i=0; i<${#PACKAGE_DIRS[@]}; i++)); do package_dir=${PACKAGE_DIRS[$i]} run_tests=${RUN_TESTS[$i]}