diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-15 17:15:10 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-15 17:15:10 -0700 |
commit | ab7e6a80278b0cd075f19261adb4ee918d983958 (patch) | |
tree | 11d7b9fed95a60201c92ff2888ee0b0cc71a1866 /gps | |
parent | 77f71801b7bbdda326ffd1b605448635db864820 (diff) | |
download | gpsd-ab7e6a80278b0cd075f19261adb4ee918d983958.tar.gz |
gps/misc: Improve polystr() to handle bytearrays.
Diffstat (limited to 'gps')
-rw-r--r-- | gps/misc.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gps/misc.py b/gps/misc.py index a5278540..bc89bf99 100644 --- a/gps/misc.py +++ b/gps/misc.py @@ -53,6 +53,8 @@ else: # Otherwise we do something real return o if isinstance(o, bytes): return str(o, encoding=BINARY_ENCODING) + if isinstance(o, bytearray): + return str(o, encoding=BINARY_ENCODING) raise ValueError def polybytes(o): |