diff options
Diffstat (limited to 'slixmpp/xmlstream/asyncio.py')
-rw-r--r-- | slixmpp/xmlstream/asyncio.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/slixmpp/xmlstream/asyncio.py b/slixmpp/xmlstream/asyncio.py deleted file mode 100644 index b42b366a..00000000 --- a/slixmpp/xmlstream/asyncio.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -asyncio-related utilities -""" - -import asyncio -from functools import wraps - -def future_wrapper(func): - """ - Make sure the result of a function call is an asyncio.Future() - object. - """ - @wraps(func) - def wrapper(*args, **kwargs): - result = func(*args, **kwargs) - if isinstance(result, asyncio.Future): - return result - future = asyncio.Future() - future.set_result(result) - return future - - return wrapper |