Skip to content

Commit 7bdc9c1

Browse files
committed
Do not mark python plugins as broken in plugin installer when having dash in the name
Although plugin with a dash in the name is not a correct python package name, the qgis python support recognizes them as valid plugins - so let's have the same behavior in the installer.
1 parent 4e6ba7b commit 7bdc9c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/pyplugin_installer/installer_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,9 @@ def pluginMetadata(fct):
618618
elif testLoad:
619619
# only testLoad if compatible version
620620
try:
621-
exec "import %s" % key in globals(), locals()
622-
exec "reload (%s)" % key in globals(), locals()
623-
exec "%s.classFactory(iface)" % key in globals(), locals()
621+
pkg = __import__(key)
622+
reload(pkg)
623+
pkg.classFactory(iface)
624624
except Exception, e:
625625
error = "broken"
626626
errorDetails = unicode(e.args[0])

0 commit comments

Comments
 (0)