summaryrefslogtreecommitdiff
path: root/alot/ui.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-10-04 08:46:22 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-10-04 08:46:22 -0700
commit52f92e891a09796ef4212ed355e8ce0faede9d79 (patch)
tree5263cdb906e1c84df889d814c1c48fd9f4e37824 /alot/ui.py
parent41197b766f5223c1d3f02594c9324b67c14c56ae (diff)
ui: Use Eventloop.create_future instead of asyncio.Future
This is recommended since other implementations can use this hook to return their own Future compatible implementations.
Diffstat (limited to 'alot/ui.py')
-rw-r--r--alot/ui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/ui.py b/alot/ui.py
index 457fd078..013b4e7a 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -310,7 +310,7 @@ class UI(object):
"""
history = history or []
- fut = asyncio.Future()
+ fut = asyncio.get_event_loop().create_future()
oldroot = self.mainloop.widget
def select_or_cancel(text):
@@ -539,7 +539,7 @@ class UI(object):
assert cancel is None or cancel in choices.values()
assert msg_position in ['left', 'above']
- fut = asyncio.Future() # Create a returned future
+ fut = asyncio.get_event_loop().create_future() # Create a returned future
oldroot = self.mainloop.widget
def select_or_cancel(text):