proto.py: Fix base64 encoding in make_protobuf
First issue: Cannot check for presence of list in dictionary because it is not hashable. Second issue: Wrong function name was being used (make_proto instead of _make_protobuf) Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
parent
d604a007a9
commit
889dabb112
@ -149,8 +149,8 @@ def _make_protobuf(data):
|
||||
data = new_data
|
||||
if isinstance(data, str):
|
||||
return data.encode('utf-8')
|
||||
elif len(data) == 2 and data[0] in base64_enc_funcs:
|
||||
return base64_enc_funcs[data[0]](make_proto(data[1]))
|
||||
elif len(data) == 2 and data[0] in list(base64_enc_funcs.keys()):
|
||||
return base64_enc_funcs[data[0]](_make_protobuf(data[1]))
|
||||
elif isinstance(data, list):
|
||||
result = b''
|
||||
for field in data:
|
||||
|
Loading…
x
Reference in New Issue
Block a user