From 6732be1434d16d675b3ac76f3713fabf4d8950a8 Mon Sep 17 00:00:00 2001 From: penenkel <7736404+penenkel@users.noreply.github.com> Date: Wed, 2 Dec 2020 22:34:29 +0100 Subject: [PATCH] `getPidList()` now returns pids as bytes instead of bytearrays --- DeDRM_plugin/kgenpids.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DeDRM_plugin/kgenpids.py b/DeDRM_plugin/kgenpids.py index 86ffab7..9800254 100644 --- a/DeDRM_plugin/kgenpids.py +++ b/DeDRM_plugin/kgenpids.py @@ -296,14 +296,14 @@ def getPidList(md1, md2, serials=[], kDatabases=[]): for kDatabase in kDatabases: try: - pidlst.extend(getK4Pids(md1, md2, kDatabase)) + pidlst.extend(map(bytes,getK4Pids(md1, md2, kDatabase))) except Exception as e: print("Error getting PIDs from database {0}: {1}".format(kDatabase[0],e.args[0])) traceback.print_exc() for serialnum in serials: try: - pidlst.extend(getKindlePids(md1, md2, serialnum)) + pidlst.extend(map(bytes,getKindlePids(md1, md2, serialnum))) except Exception as e: print("Error getting PIDs from serial number {0}: {1}".format(serialnum ,e.args[0])) traceback.print_exc()