mirror of
https://github.com/fairwaves/UHD-Fairwaves.git
synced 2025-10-22 23:31:59 +00:00
host: Python 2 compatibility for umtrx_property_tree.py
bytes(u'something', 'utf-8') is only available in Python 3. A backwards compatible version of it is u'something'.encode('utf-8').
This commit is contained in:
@@ -26,7 +26,7 @@ class umtrx_property_tree:
|
||||
d = dict(action=action, path=path)
|
||||
if value_type is not None: d['type'] = value_type
|
||||
if value is not None: d['value'] = value
|
||||
return self.s.send(bytes(json.dumps(d)+'\n', 'UTF-8'))
|
||||
return self.s.send((json.dumps(d)+'\n').encode('UTF-8'))
|
||||
|
||||
def _recv_response(self):
|
||||
resp = self.f.readline().strip()
|
||||
|
Reference in New Issue
Block a user