Skip to content

Commit

Permalink
Update to Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
mikacousin committed Dec 2, 2020
1 parent 3ff957f commit 01bd599
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions python/ola/OlaClient.py
Expand Up @@ -1172,11 +1172,7 @@ def UpdateDmxData(self, controller, request, callback):
return False

if request.universe in self._universe_callbacks:
data = array.array('B')
if sys.version >= '3.2':
data.frombytes(request.data)
else:
data.fromstring(request.data)
data = array.array('B', request.data)
self._universe_callbacks[request.universe](data)
response = Ola_pb2.Ack()
callback(response)
Expand Down Expand Up @@ -1480,11 +1476,7 @@ def _GetDmxComplete(self, callback, controller, response):
universe = None

if status.Succeeded():
data = array.array('B')
if sys.version >= '3.2':
data.frombytes(response.data)
else:
data.fromstring(response.data)
data = array.array('B', response.data)
universe = response.universe

callback(status, universe, data)
Expand Down

0 comments on commit 01bd599

Please sign in to comment.