summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-03 22:29:32 +0100
committerAnton Khirnov <anton@khirnov.net>2021-12-03 22:29:32 +0100
commit222ebaed846ba6739e17a09c2b16f10c853790bf (patch)
treea75f5dd7473c10774a24dbf75fa6a62bcbc034f0
parent85416b449936c6537575f64c3653240d25febe95 (diff)
ui: change command hooks back to normal callables
They are treated as coroutines now, but this does not seem to be documented. This is a step towards making commands synhronous again.
-rw-r--r--alot/ui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/ui.py b/alot/ui.py
index 69c9cda3..b975a511 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -719,7 +719,7 @@ class UI:
# allowed as a value fo cmd.
if cmd:
if cmd.prehook:
- await cmd.prehook(ui=self, dbm=self.dbman, cmd=cmd)
+ cmd.prehook(ui=self, dbm=self.dbman, cmd=cmd)
try:
if asyncio.iscoroutinefunction(cmd.apply):
await cmd.apply(self)
@@ -730,7 +730,7 @@ class UI:
else:
if cmd.posthook:
logging.info('calling post-hook')
- await cmd.posthook(ui=self, dbm=self.dbman, cmd=cmd)
+ cmd.posthook(ui=self, dbm=self.dbman, cmd=cmd)
def handle_signal(self, signum, frame):
"""