mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
array.array.tostring is removed in Python 3.9
This commit is contained in:
parent
ce111cfb61
commit
153396acbb
1 changed files with 6 additions and 1 deletions
|
@ -36,6 +36,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import array
|
import array
|
||||||
import struct
|
import struct
|
||||||
import uuid
|
import uuid
|
||||||
|
@ -357,6 +358,10 @@ class ABNF(object):
|
||||||
_d = array.array("B", data)
|
_d = array.array("B", data)
|
||||||
for i in range(len(_d)):
|
for i in range(len(_d)):
|
||||||
_d[i] ^= _m[i % 4]
|
_d[i] ^= _m[i % 4]
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 2):
|
||||||
|
return _d.tobytes()
|
||||||
|
else:
|
||||||
return _d.tostring()
|
return _d.tostring()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue