def _findUiResource(self, resource): r = os.path.join(ResourcesConfiguration.getStaticResources(), "ui", resource) if os.path.isfile(r): return r r = os.path.join(ResourcesConfiguration.getPluginsStaticResources(), "ui", resource) if os.path.isfile(r): return r raise NetzobAbstractViewException(_("Requested file ({0}) was not found.").format(resource))
def _findUiResource(self, resource): r = os.path.join(ResourcesConfiguration.getStaticResources(), "ui", resource) if os.path.isfile(r): return r r = os.path.join(ResourcesConfiguration.getPluginsStaticResources(), "ui", resource) if os.path.isfile(r): return r raise NetzobAbstractViewException( _("Requested file ({0}) was not found.").format(resource))
def getPluginStaticResourcesPath(self): """Computes and returns the path to the static resources associated with the current plugin""" try: pluginPath = os.path.join(ResourcesConfiguration.getPluginsStaticResources(), self.getName()) logging.debug("The computed path for plugins' static resources is: {0}.".format(pluginPath)) return pluginPath except ResourcesConfigurationException, e: raise NetzobPluginException(str(e))
def getPluginStaticResourcesPath(self): """Computes and returns the path to the static resources associated with the current plugin""" try: pluginPath = os.path.join( ResourcesConfiguration.getPluginsStaticResources(), self.getName()) logging.debug( "The computed path for plugins' static resources is: {0}.". format(pluginPath)) return pluginPath except ResourcesConfigurationException, e: raise NetzobPluginException(str(e))