This commit is contained in:
Alex Root Junior 2018-05-02 18:24:23 +03:00
parent b597f1e565
commit 60bf8aa0dd
4 changed files with 3 additions and 19 deletions

View file

@ -1,6 +1,7 @@
import asyncio
from .bot import Bot
from .dispatcher import Dispatcher
try:
import uvloop

View file

@ -1,5 +1,5 @@
from aiogram.utils import context
from .filters import check_filters
from ..utils import context
class SkipHandler(BaseException):

View file

@ -85,7 +85,7 @@ class _MatchErrorMixin:
@classmethod
def throw(cls):
"""
Throw a error
Throw error
:raise: this
"""
@ -124,7 +124,6 @@ class BadRequest(TelegramAPIError, _MatchErrorMixin):
class MessageError(BadRequest):
__group = True
pass
class MessageNotModified(MessageError):

View file

@ -1,16 +0,0 @@
import typing
async def safe(coro: typing.Coroutine) -> (bool, typing.Any):
"""
Safety execute coroutine
Status - returns True if success otherwise False
:param coro:
:return: status and result
"""
try:
return True, await coro
except Exception as e:
return False, e