mirror of
https://github.com/Leseratte10/acsm-calibre-plugin
synced 2026-08-17 04:31:42 -04:00
Fix Python2 bugs in GUI code
This commit is contained in:
@@ -10,7 +10,10 @@
|
||||
|
||||
|
||||
from calibre.customize import InterfaceActionBase # type: ignore
|
||||
from calibre.customize import PluginInstallationType
|
||||
try:
|
||||
from calibre.customize import PluginInstallationType
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
class DeACSMMigrationPlugin(InterfaceActionBase):
|
||||
@@ -28,8 +31,12 @@ class DeACSMMigrationPlugin(InterfaceActionBase):
|
||||
type = "File type"
|
||||
# Just so that the GUI extension shows up at the same place as the actual ACSM Input plugin.
|
||||
|
||||
installation_type = PluginInstallationType.EXTERNAL
|
||||
# Mark this as user-installed so it shows up in the plugin list by default.
|
||||
try:
|
||||
installation_type = PluginInstallationType.EXTERNAL
|
||||
# Mark this as user-installed so it shows up in the plugin list by default.
|
||||
except:
|
||||
# Setting the Installation type doesn't always work on Calibre 4 and below.
|
||||
pass
|
||||
|
||||
actual_plugin = "calibre_plugins.deacsm.migration:ActualMigrationPlugin"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user