separate region exceptions

This commit is contained in:
Devaev Maxim
2019-09-12 02:13:52 +03:00
parent 8214a20d4a
commit 6ce9f4c7a9
5 changed files with 15 additions and 18 deletions

View File

@@ -26,13 +26,8 @@ from typing import Type
# =====
class RegionIsBusyError(Exception):
def __init__(self) -> None:
super().__init__("Performing another operation, please try again later")
class AioExclusiveRegion:
def __init__(self, exc_type: Type[RegionIsBusyError]) -> None:
def __init__(self, exc_type: Type[Exception]) -> None:
self.__exc_type = exc_type
self.__busy = False