mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Plugin updater dialog should not break if an installed plugin incorrectly has a string based version number
This commit is contained in:
parent
8774db35fd
commit
2162b4f597
@ -41,7 +41,7 @@ Environment variables
|
||||
* ``CALIBRE_SHOW_DEPRECATION_WARNINGS`` - Causes calibre to print deprecation warnings to stdout. Useful for calibre developers.
|
||||
* ``CALIBRE_NO_DEFAULT_PROGRAMS`` - Prevent calibre from automatically registering the filetypes it is capable of handling with Windows.
|
||||
* ``CALIBRE_USE_DARK_PALETTE`` - Set it to ``1`` to have calibre use dark colors and ``0`` for normal colors (ignored on macOS).
|
||||
On Windows 10 in the absence of this variable, the windows system preference for dark colors is used.
|
||||
On Windows 10 in the absence of this variable, the Windows system preference for dark colors is used.
|
||||
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
|
||||
* ``http_proxy``, ``https_proxy`` - Used on Linux to specify an HTTP(S) proxy
|
||||
|
||||
|
@ -224,6 +224,8 @@ class DisplayPlugin(object):
|
||||
return filter_text in icu_lower(self.name) # case-insensitive filtering
|
||||
|
||||
def is_upgrade_available(self):
|
||||
if isinstance(self.installed_version, str):
|
||||
return True
|
||||
return self.is_installed() and (self.installed_version < self.available_version or self.is_deprecated)
|
||||
|
||||
def is_valid_platform(self):
|
||||
@ -414,7 +416,11 @@ class DisplayPluginModel(QAbstractTableModel):
|
||||
if display_plugin.installed_version is None:
|
||||
return (_('You can install this plugin')+'\n\n'+
|
||||
_('Right-click to see more options'))
|
||||
if display_plugin.installed_version < display_plugin.available_version:
|
||||
try:
|
||||
if display_plugin.installed_version < display_plugin.available_version:
|
||||
return (_('A new version of this plugin is available')+'\n\n'+
|
||||
_('Right-click to see more options'))
|
||||
except Exception:
|
||||
return (_('A new version of this plugin is available')+'\n\n'+
|
||||
_('Right-click to see more options'))
|
||||
return (_('This plugin is installed and up-to-date')+'\n\n'+
|
||||
|
Loading…
x
Reference in New Issue
Block a user