mirror of
https://github.com/fairwaves/UHD-Fairwaves.git
synced 2025-11-02 21:13:14 +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)
|
d = dict(action=action, path=path)
|
||||||
if value_type is not None: d['type'] = value_type
|
if value_type is not None: d['type'] = value_type
|
||||||
if value is not None: d['value'] = value
|
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):
|
def _recv_response(self):
|
||||||
resp = self.f.readline().strip()
|
resp = self.f.readline().strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user