(self, plugin)
Returns the metadata dictionary for the plugin.

        @param plugin name of the plugin or the plugin's info file

        @return dictionary containing the plugin's metadata
Returns the metadata dictionary for the plugin.
Returns the metadata dictionary for the plugin .
def metadata_for_plugin(self, plugin):
        """
        Returns the metadata dictionary for the plugin.

        @param plugin name of the plugin or the plugin's info file

        @return dictionary containing the plugin's metadata
        """
        if plugin in self._plugins:
            return self._plugins[plugin]
        else:
            fp = None
            metadata = None
            info_file = plugin + INFO_FILE_EXTENSION
            try:
                fp = open(os.path.join(self.path, info_file), 'r')
                metadata = json.load(fp)
            except Exception as e:
                self.log.exception('Exception caught while loading plugin metadata: %s' % e)
                raise e
            finally:
                if fp:
                    fp.close()
                return metadata
def metadata_for_plugin ( self , plugin ) : if plugin in self . _plugins : return self . _plugins [ plugin ] else : fp = None metadata = None info_file = plugin + INFO_FILE_EXTENSION try : fp = open ( os . path . join ( self . path , info_file ) , 'r' ) metadata = json . load ( fp ) except Exception as e : self . log . exception ( 'Exception caught while loading plugin metadata: %s' % e ) raise e finally : if fp : fp . close ( ) return metadata