diff options
author | Anton Parkhomenko <mailbox@chuwy.me> | 2015-02-22 05:49:48 +0700 |
---|---|---|
committer | Anton Parkhomenko <mailbox@chuwy.me> | 2015-02-22 05:49:48 +0700 |
commit | 7e99e4a147795dfb6d24a2f0c992fcaa418ffb23 (patch) | |
tree | 44283b469b2addc5b9906335e3777d475606f78c /alot | |
parent | f580e2b168d633d34f1c6f9838f59f98dbd93463 (diff) |
Fix call without hooks
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/globals.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 2e7a81b2..e090f757 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -362,10 +362,11 @@ class CallCommand(Command): def apply(self, ui): try: hooks = settings.hooks - env = {'ui': ui, 'settings': settings} - for k, v in env.items(): - if k not in hooks.__dict__: - hooks.__dict__[k] = v + if hooks: + env = {'ui': ui, 'settings': settings} + for k, v in env.items(): + if k not in hooks.__dict__: + hooks.__dict__[k] = v exec(self.command) except Exception as e: |