diff options
author | NoDRM <[email protected]> | 2023-08-03 20:45:06 +0200 |
---|---|---|
committer | NoDRM <[email protected]> | 2023-08-03 20:45:06 +0200 |
commit | 53996cf49c504264a3632576f15fc492dd371860 (patch) | |
tree | 53966c3e27b9f8c55be89e7920b2cca77fdce991 /DeDRM_plugin/kindlepid.py | |
parent | d388ae72fd797efcef3da2b4ff8694cfaa4431cb (diff) |
More Python2 fixes
Diffstat (limited to 'DeDRM_plugin/kindlepid.py')
-rw-r--r-- | DeDRM_plugin/kindlepid.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/DeDRM_plugin/kindlepid.py b/DeDRM_plugin/kindlepid.py index a034e40..2d53b99 100644 --- a/DeDRM_plugin/kindlepid.py +++ b/DeDRM_plugin/kindlepid.py @@ -16,17 +16,17 @@ import sys import binascii -from utilities import SafeUnbuffered +from .utilities import SafeUnbuffered -from argv_utils import unicode_argv +from .argv_utils import unicode_argv -letters = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789' +letters = b'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789' def crc32(s): return (~binascii.crc32(s,-1))&0xFFFFFFFF def checksumPid(s): - crc = crc32(s.encode('ascii')) + crc = crc32(s) crc = crc ^ (crc >> 16) res = s l = len(letters) |