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 in22f08609f1but 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:22f08609f1("vici: Explicitly set the Python encoding type"). Closes strongswan/strongswan#66.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user