Browse Source

Another 2to3 workaround.

pyserial_fix
Scott Petersen 8 years ago
parent
commit
5244e91fb8
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      alarmdecoder/decoder.py

+ 3
- 1
alarmdecoder/decoder.py View File

@@ -248,7 +248,9 @@ class AlarmDecoder(object):
"""

if self._device:
self._device.write(str.encode(data))
if isinstance(data, str):
data = str.encode(data)
self._device.write(data)

def get_config(self):
"""


Loading…
Cancel
Save