Fix more Py2/Py3 stuff

This commit is contained in:
NoDRM
2023-08-06 15:49:52 +02:00
parent 10b6caf9f5
commit ef67dbd204
12 changed files with 40 additions and 8 deletions

View File

@@ -14,7 +14,8 @@ if "calibre" in sys.modules and sys.version_info[0] == 2:
if os.path.join(config_dir, "plugins", "DeDRM.zip") not in sys.path:
sys.path.insert(0, os.path.join(config_dir, "plugins", "DeDRM.zip"))
# Explicitly set the package identifier so we are allowed to import stuff ...
__package__ = "calibre_plugins.dedrm"
if "calibre" in sys.modules:
# Explicitly set the package identifier so we are allowed to import stuff ...
__package__ = "calibre_plugins.dedrm"
#@@CALIBRE_COMPAT_CODE_END@@