diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-12-03 22:29:32 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-12-03 22:29:32 +0100 |
commit | 222ebaed846ba6739e17a09c2b16f10c853790bf (patch) | |
tree | a75f5dd7473c10774a24dbf75fa6a62bcbc034f0 /alot | |
parent | 85416b449936c6537575f64c3653240d25febe95 (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.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/ui.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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): """ |