def loadResources(self, isInstalled): g.feedback.log(LogLevels.INFO, "Loading resources") try: i = 0 dataResources = self.data["Resources"] for k in dataResources.keys(): g.feedback.log(LogLevels.DEBUG, "Found resource with ID %s" % k) res = ResourceWrapper(k, self, dataResources[k], self.os, self.arch) if res.checkConditions(): g.feedback.log(LogLevels.DEBUG, "Conditions met for resource %s" % k) g.feedback.log( LogLevels.DEBUG, "Setting installed status of %s to %s" % (k, str(isInstalled))) res.setInstalled(isInstalled) self.resources.append(res) else: g.feedback.log(LogLevels.DEBUG, "Conditions not met for resource %s" % k) i += 1 if i < 1: raise ManifestException( "The manifest must contain at least one resource") except KeyError: raise ManifestException( "The manifest file does not contain any resources")
def loadResources(self, isInstalled): g.feedback.log(LogLevels.INFO, "Loading resources") try: i = 0 dataResources = self.data["Resources"] for k in dataResources.keys(): g.feedback.log(LogLevels.DEBUG, "Found resource with ID %s" % k) res = ResourceWrapper(k, self, dataResources[k], self.os, self.arch) if res.checkConditions(): g.feedback.log(LogLevels.DEBUG, "Conditions met for resource %s" % k) g.feedback.log(LogLevels.DEBUG, "Setting installed status of %s to %s" % (k, str(isInstalled))) res.setInstalled(isInstalled) self.resources.append(res) else: g.feedback.log(LogLevels.DEBUG, "Conditions not met for resource %s" % k) i += 1 if i < 1: raise ManifestException("The manifest must contain at least one resource") except KeyError: raise ManifestException("The manifest file does not contain any resources")
def loadResources(self): g.feedback.log(LogLevels.INFO, "Loading resources") g.feedback.userMessage("MSG", "Loading resources") try: i = 0 dataResources = self.data["Resources"] for k in dataResources.keys(): g.feedback.log(LogLevels.DEBUG, "Found resource with ID %s" % k) g.feedback.userMessage("MSG", "Loading Resource: %s" % k) try: res = ResourceWrapper(k, self, dataResources[k], self.os, self.arch) if res.checkConditions(): g.feedback.log(LogLevels.DEBUG, "Conditions met for resource %s" % k) self.resources.append(res) else: g.feedback.log(LogLevels.DEBUG, "Conditions not met for resource %s" % k) i += 1 except ActivityNotFoundException: g.feedback.log(LogLevels.WARN, "No implementation for resource %s, ignoring" % k) if i < 1: raise ManifestException("The manifest must contain at least one valid resource") except KeyError: raise ManifestException("The manifest file does not contain any valid resources")