patman: Switch over to asyncio
Now that all the pieces are in place, switch over from using an executor
to using asyncio.
While we are here, import defaultdict to avoid needing to specify its
module.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/patman/patchwork.py b/tools/patman/patchwork.py
index 8b0968c..2b7734b 100644
--- a/tools/patman/patchwork.py
+++ b/tools/patman/patchwork.py
@@ -9,6 +9,7 @@
import re
import aiohttp
+from u_boot_pylib import terminal
# Number of retries
RETRIES = 3
@@ -188,13 +189,6 @@
if i == RETRIES:
raise
- async def session_request(self, subpath):
- async with aiohttp.ClientSession() as client:
- return await self._request(client, subpath)
-
- def request(self, subpath):
- return asyncio.run(self.session_request(subpath))
-
@staticmethod
def for_testing(func):
"""Get an instance to use for testing