Skip to content
Permalink
Browse files
Do not load metadata from __init__.py
  • Loading branch information
wonder-sk committed Mar 18, 2013
1 parent 67f4c72 commit 41dc7544d03c4a0a0635c75d0810ed0096f14611
Showing with 5 additions and 8 deletions.
  1. +5 −8 python/utils.py
@@ -155,14 +155,11 @@ def updateAvailablePlugins():

def pluginMetadata(packageName, fct):
""" fetch metadata from a plugin """
try:
# try to use values from metadata.txt if available
if plugins_metadata_parser.has_key(packageName):
return plugins_metadata_parser[packageName].get('general', fct)
# otherwise fall back to old method, using __init__.py
package = sys.modules[packageName]
return getattr(package, fct)()
except:

# use values from metadata.txt
if plugins_metadata_parser.has_key(packageName):
return plugins_metadata_parser[packageName].get('general', fct)
else:
return "__error__"

def loadPlugin(packageName):

0 comments on commit 41dc754

Please sign in to comment.