Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin installer - rephrase error message when plugin is not found #38153

Merged
merged 1 commit into from
Aug 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions python/pyplugin_installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,20 @@ def installPlugin(self, key, quiet=False, stable=True):
dlg = QgsPluginInstallerInstallingDialog(iface.mainWindow(), plugin, stable=stable)
dlg.exec_()

plugin_path = qgis.utils.home_plugin_path + "/" + key
if dlg.result():
error = True
infoString = (self.tr("Plugin installation failed"), dlg.result())
elif not QDir(qgis.utils.home_plugin_path + "/" + key).exists():
elif not QDir(plugin_path).exists():
error = True
infoString = (self.tr("Plugin has disappeared"), self.tr("The plugin seems to have been installed but I don't know where. Probably the plugin package contained a wrong named directory.\nPlease search the list of installed plugins. I'm nearly sure you'll find the plugin there, but I just can't determine which of them it is. It also means that I won't be able to determine if this plugin is installed and inform you about available updates. However the plugin may work. Please contact the plugin author and submit this issue."))
infoString = (
self.tr("Plugin has disappeared"),
self.tr(
"The plugin seems to have been installed but it's not possible to know where. The directory \"{}\" "
"has not been found. Probably the plugin package contained a wrong named directory.\nPlease search "
"the list of installed plugins. You should find the plugin there, but it's not possible to "
"determine which of them it is and it's also not possible to inform you about available updates. "
"Please contact the plugin author and submit this issue.").format(plugin_path))
QApplication.setOverrideCursor(Qt.WaitCursor)
plugins.getAllInstalled()
plugins.rebuild()
Expand Down