diff --git a/conda-store-server/conda_store_server/_internal/orm.py b/conda-store-server/conda_store_server/_internal/orm.py index 468c8cbff..b3eb0879e 100644 --- a/conda-store-server/conda_store_server/_internal/orm.py +++ b/conda-store-server/conda_store_server/_internal/orm.py @@ -40,8 +40,8 @@ ) from conda_store_server._internal import conda_utils, schema, utils -from conda_store_server.exception import BuildPathError from conda_store_server._internal.environment import validate_environment +from conda_store_server.exception import BuildPathError logger = logging.getLogger("orm") diff --git a/conda-store-server/conda_store_server/_internal/server/views/api.py b/conda-store-server/conda_store_server/_internal/server/views/api.py index fec460cc8..b33c90ffd 100644 --- a/conda-store-server/conda_store_server/_internal/server/views/api.py +++ b/conda-store-server/conda_store_server/_internal/server/views/api.py @@ -12,12 +12,12 @@ from fastapi.responses import JSONResponse, PlainTextResponse, RedirectResponse from conda_store_server import __version__, api, app -from conda_store_server._internal import orm, schema, utils +from conda_store_server._internal import orm, schema from conda_store_server._internal.environment import filter_environments from conda_store_server._internal.schema import AuthenticationToken, Permissions from conda_store_server._internal.server import dependencies -from conda_store_server.server.auth import Authentication from conda_store_server.exception import CondaStoreError +from conda_store_server.server.auth import Authentication class PaginatedArgs(TypedDict): diff --git a/conda-store-server/conda_store_server/app.py b/conda-store-server/conda_store_server/app.py index bb8af8c0e..fae95667d 100644 --- a/conda-store-server/conda_store_server/app.py +++ b/conda-store-server/conda_store_server/app.py @@ -26,8 +26,8 @@ from traitlets.config import LoggingConfigurable from conda_store_server import CONDA_STORE_DIR, BuildKey, api, storage -from conda_store_server.exception import CondaStoreError from conda_store_server._internal import conda_utils, environment, orm, schema, utils +from conda_store_server.exception import CondaStoreError from conda_store_server.plugins import hookspec, plugin_manager from conda_store_server.plugins.types import lock @@ -857,9 +857,7 @@ def delete_build(self, db: Session, build_id: int): schema.BuildStatus.FAILED, schema.BuildStatus.COMPLETED, ]: - raise CondaStoreError( - "cannot delete build since not finished building" - ) + raise CondaStoreError("cannot delete build since not finished building") build.deleted_on = datetime.datetime.utcnow() db.commit() diff --git a/conda-store-server/conda_store_server/exception.py b/conda-store-server/conda_store_server/exception.py index 50db307ad..9f160dcac 100644 --- a/conda-store-server/conda_store_server/exception.py +++ b/conda-store-server/conda_store_server/exception.py @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. + class CondaStoreError(Exception): @property def message(self):