diff options
author | odi79 <inet.github@henrici.name> | 2017-04-14 16:40:57 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-04-19 10:00:21 +0200 |
commit | 0d66b01a813afee5a0ca1eece5b2fa0aa585f38f (patch) | |
tree | df4d792c4b112dd3913d3f6dca3ea06b5154c93a /src | |
parent | bb2ba9f15d3d0ad8205d4bad1adfbdc1b6689eaf (diff) | |
download | strongswan-0d66b01a813afee5a0ca1eece5b2fa0aa585f38f.tar.bz2 strongswan-0d66b01a813afee5a0ca1eece5b2fa0aa585f38f.tar.xz |
vici: Fix type error exception in Python bindings
Line 66 yields "TypeError: can't concat bytes to str" using Python 3.4.
"requestdata" was introduced in 22f08609f1b6 but is not actually used.
Since the original "request" is not used anywhere else this can be changed
to be similar to the other UTF-8 encoding changes in that commit.
Fixes: 22f08609f1b6 ("vici: Explicitly set the Python encoding type").
Closes strongswan/strongswan#66.
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/plugins/vici/python/vici/protocol.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcharon/plugins/vici/python/vici/protocol.py b/src/libcharon/plugins/vici/python/vici/protocol.py index 919231d43..370229463 100644 --- a/src/libcharon/plugins/vici/python/vici/protocol.py +++ b/src/libcharon/plugins/vici/python/vici/protocol.py @@ -62,7 +62,7 @@ class Packet(object): @classmethod def _named_request(cls, request_type, request, message=None): - requestdata = request.encode("UTF-8") + request = request.encode("UTF-8") payload = struct.pack("!BB", request_type, len(request)) + request if message is not None: return payload + message |