From 9af49dbce5ada512f866fc484420dcedff518136 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Tue, 9 Apr 2013 17:35:10 +0000 Subject: [PATCH] Add missing option `--batch` to _allowed options set. * Rearranged the other options because their order was nolens volens. --- gnupg.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/gnupg.py b/gnupg.py index 01b65e3..9a44f42 100644 --- a/gnupg.py +++ b/gnupg.py @@ -406,12 +406,18 @@ def _is_allowed(input): ## eg, --no-show-photos would mitigate things like ## https://www-01.ibm.com/support/docview.wss?uid=swg21620982 _allowed = frozenset( - ['--list-packets', '--delete-keys', '--delete-secret-keys', - '--encrypt', '--print-mds', '--print-md', '--sign', - '--encrypt-files', '--gen-key', '--decrypt', '--decrypt-files', - '--list-keys', '--import', '--verify', '--version', - '--status-fd', '--no-tty', '--homedir', '--no-default-keyring', - '--keyring', '--passphrase-fd', '--fingerprint', '--with-colons']) + ['--list-keys', '--list-packets', '--with-colons', + '--delete-keys', '--delete-secret-keys', + '--encrypt', '--encrypt-files', + '--print-mds', '--print-md', '--sign', + '--gen-key', '--batch', + '--decrypt', '--decrypt-files', + '--import', + '--verify', + '--version', + '--status-fd', '--no-tty', '--passphrase-fd', + '--homedir', '--no-default-keyring', '--keyring', + '--fingerprint']) ## check that _allowed is a subset of _possible try: @@ -1760,7 +1766,7 @@ class GPG(object): :param always_trust: Instruct GnuPG to ignore trust checks. :param passphrase: The passphrase for the secret key used for decryption. :param output: A file to write the decrypted output to. - """ + """ args = ["--decrypt"] if output: # write the output to a file with the specified name if os.path.exists(output):