Commit 86c8f6fe authored by Dimitris Lampridis's avatar Dimitris Lampridis

[sw] [pywrap] fix decorator

parent 5bf262e1
......@@ -34,9 +34,8 @@ class wrtd_tstamp(Structure):
yield 'frac' , self.frac
@decorator.decorator
def encode_arguments(func):
def encode_arguments(func, *args, **kwargs):
"""Used to convert arguments from strings to bytes"""
def wrapper(self, *args, **kwargs):
encoded = []
for arg in args:
if(type(arg) == str):
......@@ -44,8 +43,7 @@ def encode_arguments(func):
else:
encoded.append(arg)
args = tuple(encoded)
return func(self, *args, **kwargs)
return wrapper
return func(*args, **kwargs)
class PyWrtd():
"""Top-level Python wrapper class for WRTD library.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment