diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-08-22 12:54:28 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-08-23 08:22:31 -0700 |
commit | b943267ea5c90f4a415a98f96e9a803a36022d56 (patch) | |
tree | 5fb2d58414bcd53f0f23f53314a115c57545ff15 /alot/commands/globals.py | |
parent | 3ad6ebf3b8d1e4835e4bb62be9dbc08fc48518ac (diff) |
command/globals: Test for not None rather than callable
If someone passes us something other than None or a callable they're
abusing the API. Instead, use is not None, and let the code except if
something else is passed.
Diffstat (limited to 'alot/commands/globals.py')
-rw-r--r-- | alot/commands/globals.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 4c2962e3..787ff450 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -255,7 +255,7 @@ class ExternalCommand(Command): def afterwards(data): if data == 'success': - if callable(self.on_success): + if self.on_success is not None: self.on_success() else: ui.notify(data, priority='error') |