updates to support 2/3 along with not using vcmd c extension
This commit is contained in:
parent
864c7b69a1
commit
ecc63f4abb
22 changed files with 680 additions and 636 deletions
|
@ -15,7 +15,8 @@ def pack_values(clazz, packers):
|
|||
"""
|
||||
|
||||
# iterate through tuples of values to pack
|
||||
data = ""
|
||||
logging.debug("packing: %s", packers)
|
||||
data = b""
|
||||
for packer in packers:
|
||||
# check if a transformer was provided for valid values
|
||||
transformer = None
|
||||
|
@ -26,10 +27,6 @@ def pack_values(clazz, packers):
|
|||
else:
|
||||
raise RuntimeError("packer had more than 3 arguments")
|
||||
|
||||
# convert unicode to normal str for packing
|
||||
if isinstance(value, unicode):
|
||||
value = str(value)
|
||||
|
||||
# only pack actual values and avoid packing empty strings
|
||||
# protobuf defaults to empty strings and does no imply a value to set
|
||||
if value is None or (isinstance(value, str) and not value):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue