def makeService(self, options): # Grab our configuration file's path. conf = options["config"] path = FilePath(conf) if not path.exists(): raise RuntimeError("Couldn't find config file %r" % conf) # Create our service and return it. from bravo.service import service return service(path)
def makeService(self, options): # Grab our configuration file's path. conf = options["config"] # If config is default value, check locations for configuration file. if conf == options.optParameters[0][2]: for location in self.locations: path = FilePath(os.path.join(location, conf)) if path.exists(): break else: path = FilePath(conf) if not path.exists(): raise RuntimeError("Couldn't find config file %r" % conf) # Create our service and return it. from bravo.service import service return service(path)