Commit 109d3697 authored by Vincent A's avatar Vincent A

weboob-config: fix python3 compatibility when no HTTP repository

When no HTTP repository, there might be no version number for modules, so the
value is None, which can't be compared to anything else.
parent 04c9fd60
Pipeline #3196 passed with stages
in 16 minutes and 16 seconds
......@@ -269,7 +269,11 @@ class WeboobCfg(ReplApplication):
module_info['license'] = minfo.license
module_info['description'] = minfo.description
module_info['capabilities'] = minfo.capabilities
module_info['installed'] = '%s%s' % (('yes' if module else 'no'), ' (new version available)' if self.weboob.repositories.versions.get(minfo.name) > minfo.version else '')
repo_ver = self.weboob.repositories.versions.get(minfo.name)
module_info['installed'] = '%s%s' % (
'yes' if module else 'no',
' (new version available)' if repo_ver and repo_ver > minfo.version else ''
)
module_info['location'] = '%s' % (minfo.url or os.path.join(minfo.path, minfo.name))
if module:
module_info['config'] = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment