Commit 3832b592 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[plugin_installer] Handle case when no plugins are available

parent 3905029c
...@@ -161,6 +161,9 @@ class PluginInstaller(GajimPlugin): ...@@ -161,6 +161,9 @@ class PluginInstaller(GajimPlugin):
return return
plugin_list = parse_manifests_zip(data) plugin_list = parse_manifests_zip(data)
if not plugin_list:
log.warning('No plugins found in zip')
if self._available_page is None: if self._available_page is None:
return return
self._available_page.append_plugins(plugin_list) self._available_page.append_plugins(plugin_list)
......
...@@ -58,7 +58,10 @@ class AvailablePage(Observable): ...@@ -58,7 +58,10 @@ class AvailablePage(Observable):
def append_plugins(self, plugins): def append_plugins(self, plugins):
for plugin in plugins: for plugin in plugins:
self._ui.plugin_store.append(plugin.fields) self._ui.plugin_store.append(plugin.fields)
self._select_first_plugin()
if plugins:
self._select_first_plugin()
self._update_install_button() self._update_install_button()
self._ui.spinner.stop() self._ui.spinner.stop()
self._ui.spinner.hide() self._ui.spinner.hide()
......
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