megad/utils.py
def cancelok(foo):
    """
    Deco foo not to raise on cancelation
    :param foo:
    :return:
    """
    @functools.wraps(foo)
    async def wrapper(*args, **kwargs):
        try:
            return await foo(*args, **kwargs)
        except asyncio.CancelledError:
            return
    return wrapper

    Deco foo not to raise on cancelation
    :param foo:
    :return:
    
Deco foo not to raise on cancelation
Deco foo not to raise on cancelation
def cancelok(foo):
    @functools.wraps(foo)
    async def wrapper(*args, **kwargs):
        try:
            return await foo(*args, **kwargs)
        except asyncio.CancelledError:
            return
    return wrapper
def cancelok ( foo ) : @ functools . wraps ( foo ) async def wrapper ( * args , ** kwargs ) : try : return await foo ( * args , ** kwargs ) except asyncio . CancelledError : return return wrapper
Deco foo not to raise on cancelation
Deco foo not to raise on cancelation
"""
    Deco foo not to raise on cancelation
    :param foo:
    :return:
    """
None
foo
None