aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/gpg/core.py
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-02-17 11:10:34 +0000
committerJustus Winter <[email protected]>2017-02-17 11:10:34 +0000
commit9350168a1eed3f055040d7cc8a9bf4cdf745b23a (patch)
treee6f169df44139b8b62c4160dda92ae16ca222c80 /lang/python/gpg/core.py
parentpython: Support adding and revoking UIDs. (diff)
downloadgpgme-9350168a1eed3f055040d7cc8a9bf4cdf745b23a.tar.gz
gpgme-9350168a1eed3f055040d7cc8a9bf4cdf745b23a.zip
python: Fix using strings as commands in the assuan protocol.
* lang/python/gpg/core.py (Context.assuan_transact): Fix testing whether the command is a string on Python2. * lang/python/tests/t-protocol-assuan.py: Improve the test to detect this problem. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/gpg/core.py')
-rw-r--r--lang/python/gpg/core.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lang/python/gpg/core.py b/lang/python/gpg/core.py
index beaebda2..28d4629e 100644
--- a/lang/python/gpg/core.py
+++ b/lang/python/gpg/core.py
@@ -699,7 +699,7 @@ class Context(GpgmeWrapper):
"""
- if isinstance(command, (str, bytes)):
+ if util.is_a_string(command) or isinstance(command, bytes):
cmd = command
else:
cmd = " ".join(util.percent_escape(f) for f in command)