aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-12-19 10:46:26 -0800
committerGravatar MarkKoz <[email protected]>2020-12-19 10:46:26 -0800
commit2021c78635de4ae5a9f9835944c87cba699b41c0 (patch)
tree3607a9a368194987670df09bf060e2cc6ab8b594
parentAPIClient: simplify session creation (diff)
APIClient: remove obsolete function
-rw-r--r--bot/api.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/bot/api.py b/bot/api.py
index 6436c2b8b..ce3f2ada3 100644
--- a/bot/api.py
+++ b/bot/api.py
@@ -110,17 +110,3 @@ class APIClient:
await self.maybe_raise_for_status(resp, raise_for_status)
return await resp.json()
-
-
-def loop_is_running() -> bool:
- """
- Determine if there is a running asyncio event loop.
-
- This helps enable "call this when event loop is running" logic (see: Twisted's `callWhenRunning`),
- which is currently not provided by asyncio.
- """
- try:
- asyncio.get_running_loop()
- except RuntimeError:
- return False
- return True