diff options
author | Devaev Maxim <[email protected]> | 2019-09-12 02:13:52 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-09-12 02:13:52 +0300 |
commit | 6ce9f4c7a970a01f9feca77eb6156d6fadb91202 (patch) | |
tree | 5c7b4b53979138128cc0d7e0b36e95ef0c3dbf47 /kvmd/apps | |
parent | 8214a20d4af3fdb59bb35bd8f83d3d9977de8f35 (diff) |
separate region exceptions
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/kvmd/server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/apps/kvmd/server.py b/kvmd/apps/kvmd/server.py index a0c14224..2f4b5aa7 100644 --- a/kvmd/apps/kvmd/server.py +++ b/kvmd/apps/kvmd/server.py @@ -42,14 +42,14 @@ import setproctitle from ...logging import get_logger -from ...aioregion import RegionIsBusyError - from ...plugins.hid import BaseHid from ...plugins.atx import AtxOperationError +from ...plugins.atx import AtxIsBusyError from ...plugins.atx import BaseAtx from ...plugins.msd import MsdOperationError +from ...plugins.msd import MsdIsBusyError from ...plugins.msd import BaseMsd from ...validators import ValidatorError @@ -187,7 +187,7 @@ def _exposed(http_method: str, path: str, auth_required: bool=True) -> Callable: return (await handler(self, request)) - except RegionIsBusyError as err: + except (AtxIsBusyError, MsdIsBusyError) as err: return _json_exception(err, 409) except (ValidatorError, AtxOperationError, MsdOperationError) as err: return _json_exception(err, 400) |