@@ -511,7 +511,7 @@ def removeRepository(self, repo):
511
511
512
512
513
513
# ----------------------------------------- #
514
- def getInstalledPlugin (self , key , readOnly ):
514
+ def getInstalledPlugin (self , key , readOnly , testLoad = False ):
515
515
""" get the metadata of an installed plugin """
516
516
if readOnly :
517
517
path = QgsApplication .pkgDataPath ()
@@ -557,10 +557,11 @@ def getInstalledPlugin(self, key, readOnly):
557
557
errorDetails = qgisMinimumVersion
558
558
except :
559
559
pass
560
- try :
561
- exec ("%s.classFactory(iface)" % key )
562
- except Exception , error :
563
- error = unicode (error .args [0 ])
560
+ if testLoad :
561
+ try :
562
+ exec ("%s.classFactory(iface)" % key )
563
+ except Exception , error :
564
+ error = unicode (error .args [0 ])
564
565
except Exception , error :
565
566
error = unicode (error .args [0 ])
566
567
@@ -596,7 +597,7 @@ def getInstalledPlugin(self, key, readOnly):
596
597
597
598
598
599
# ----------------------------------------- #
599
- def getAllInstalled (self ):
600
+ def getAllInstalled (self , testLoad = False ):
600
601
""" Build the localCache """
601
602
self .localCache = {}
602
603
# first, try to add the read-only plugins...
@@ -625,7 +626,7 @@ def getAllInstalled(self):
625
626
for key in pluginDir .entryList ():
626
627
key = unicode (key )
627
628
if not key in ["." ,".." ]:
628
- plugin = self .getInstalledPlugin (key , False )
629
+ plugin = self .getInstalledPlugin (key , False , testLoad )
629
630
if key in self .localCache .keys () and compareVersions (self .localCache [key ]["version_inst" ],plugin ["version_inst" ]) == 1 :
630
631
# An obsolete plugin in the "user" location is masking a newer one in the "system" location!
631
632
self .obsoletePlugins += [key ]
0 commit comments