summaryrefslogtreecommitdiff
path: root/alot/commands/utils.py
Commit message (Collapse)AuthorAge
* Cosmetics, clean up importsAnton Khirnov2021-02-10
|
* rename get_account_by_address to account_matching_addressvrs2018-12-10
| | | | | ... since accounts' addresses can overlap and get_account_by_address promises too much. Also remove now-obsolete get_addresses.
* attach accounts to envelopesvrs2018-12-10
| | | | simplifies a few tests, fixes #1177
* command/envelope: use asyncio coroutines instead of twisted inlineCallbacksDylan Baker2018-07-26
|
* rename function that updates gpg keys in envelopesPatrick Totzke2018-06-21
|
* Merge pull request #1228 from dcbaker/auto-encrypt-newPatrick Totzke2018-06-19
|\ | | | | envelope: Update encryption keys when CC, To, or From is changed
| * envelope: Update encryption keys when CC, To, or From is changedDylan Baker2018-03-12
| | | | | | | | | | | | | | | | | | | | | | | | Currently the encryption keys will only be updated when they are toggled, which means that if you change a Cc or To then the keys encrypted to might be wrong, either too many keys will be encrypted to, or not enough, or just the wrong ones. This patches fixes this by calling set_encrypt whenever the 'To', 'Cc', or 'From' headers are changed by set or unset. Fixes #1227
* | Remove old __future__ importsLucas Hoffmann2018-06-19
|/ | | | They are not needed for python >= 3.0.
* fix ambiguous keys harderDylan Baker2018-02-08
| | | | always pass keyword arguments as thus, to prevent problems like this.
* * apply code review commentsMartin Schaaf2017-12-12
|
* Fix issue 1164 of not able to select a key for encryption on ambigious keyid ↵Martin Schaaf2017-11-01
| | | | | | | | | | error * avoid endless loop if the selected key leads to an ambiguous key error again * do not add the resulting key to the loop again instead add it directly * use a list of keys as selection return values * add fpr to visual key selection list to be able to select the expected key * remove reversed call that should not be necessary
* commands/util: encrypt to selfRuben Pollan2017-09-26
| | | | | | | | Add account configuration variable 'encrypt_to_self' that if true when encrypting a message it will also be encrypted with the key defined for this account. Fixes #1140
* Replace Exception.message with str(Exception)Dylan Baker2017-08-19
| | | | | | In python3 Exception doesn't have a message attribute, the only way to get the string output is to call str() on the Exception. This also works in python 2.7, so go ahead and make that change.
* just use the OpenPGP fingerprint instead of inventing "hash_key"Daniel Kahn Gillmor2017-08-14
|
* convert from pygpgme to the python "gpg" moduleDaniel Kahn Gillmor2017-08-14
| | | | | | | | | | | | | | | This converts from the now abandoned pygpgme project for wrapping gpgme, to the upstream gpgme python bindings (which are descended from the pyme project, before they became official). Largely this change should not be user visible, but there are a couple cases where the new bindings provide slightly more detailed error messages, and alot directly presents those messages to users. This patch has been significantly revised and updated by Dylan Baker, but was originally authored by Daniel Kahn Gillmor. Fixes #1069
* settings/manager: Extend the get_account_by_address with return_defaultDylan Baker2017-07-27
| | | | | | This new return_default flag (which is an optional and default to False) will try to return the default account if it cannot find an account matching the address hint.
* Convert gpg uid choices into a listRuben Pollan2017-02-08
| | | | reversed doesn't work with generators
* Use absolute_imports from __future__Lucas Hoffmann2017-01-18
|
* Encrypt for the CC addresses tooRuben Pollan2017-01-01
|
* commands/utils: Refactor exception caseDylan Baker2016-12-27
| | | | | | | | | This removes the use of range (originally I simply replaced it with xrange, but the realized that the use of range was itself strange), and replaces it with generators and iterators to create the dictionary. This has the advantage of only creating one concrete instance (the choices dict), and being slightly easier to read and understand, as well as not needing to call len() repeatedly.
* Clean up importsLucas Hoffmann2016-12-09
| | | | | | - use relative imports if possible - group imports into standard library, third party, and alot modules - sort imports alphabetically
* Fix double space.Lucas Hoffmann2016-03-24
|
* Implement key id validity checks for encrypt_by_default.Lucas Hoffmann2016-03-24
| | | | | If encrypt_by_default is set to 'Valid' only keys whose email is trusted to belong to the key are used.
* Add and update several docstrings.Lucas Hoffmann2016-03-11
|
* Encrypt on reply to encrypted email and add 'encrypt_by_default' configRuben Pollan2015-12-16