diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-12-13 12:15:48 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-12-13 12:34:15 -0800 |
commit | d3aa06f81ffbfb24de122b849263dc7655332371 (patch) | |
tree | a6bf490042f276a10054acb887e294d312dd68d2 /alot | |
parent | 5a7fea876b893101d0d534100ae6b521e275d4eb (diff) |
Don't pass None as second argument of dict.get()
This is the default value.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/thread.py | 4 | ||||
-rw-r--r-- | alot/db/utils.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 55920090..ad7110ed 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -965,8 +965,8 @@ class OpenAttachmentCommand(Command): handler_cmdlist = split_commandstring(handler_cmd) # 'needsterminal' makes handler overtake the terminal - nt = entry.get('needsterminal', None) - overtakes = (nt is None) + # XXX: could this be repalced with "'needsterminal' not in entry"? + overtakes = entry.get('needsterminal') is None ui.apply_command(ExternalCommand(handler_cmdlist, stdin=handler_stdin, diff --git a/alot/db/utils.py b/alot/db/utils.py index 5acbb017..188a4b3a 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -111,7 +111,7 @@ def message_from_file(handle): # handle OpenPGP signed data if (m.is_multipart() and m.get_content_subtype() == 'signed' and - p.get('protocol', None) == app_pgp_sig): + p.get('protocol') == app_pgp_sig): # RFC 3156 is quite strict: # * exactly two messages # * the second is of type 'application/pgp-signature' @@ -147,7 +147,7 @@ def message_from_file(handle): # handle OpenPGP encrypted data elif (m.is_multipart() and m.get_content_subtype() == 'encrypted' and - p.get('protocol', None) == app_pgp_enc and + p.get('protocol') == app_pgp_enc and 'Version: 1' in m.get_payload(0).get_payload()): # RFC 3156 is quite strict: # * exactly two messages |