def parse(self, args): if args.file: args.file.close() cfg = path(args.file.name) else: cfg = self.dir / "etc" / "omero.properties" from omero.install.config_parser import PropertyParser pp = PropertyParser() pp.parse_file(str(cfg.abspath())) # Parse PSQL profile file for p in pp: if p.key == "omero.db.profile": psql_file = self.dir / "etc" / "profiles" / p.val pp.parse_file(str(psql_file.abspath())) break # Parse OMERO.web configuration properties if not args.no_web: pp.parse_module('omeroweb.settings') # Display options if args.headers: pp.print_headers() elif args.keys: pp.print_keys() elif args.rst: pp.print_rst() else: pp.print_defaults()
def parse(self, args): from omero.install.config_parser import PropertyParser pp = PropertyParser() if args.file: args.file.close() pp.parse_file(str(path(args.file.name).abspath())) else: pp.parse_lines(self.ctx.get_config_property_lines(self.dir)) # Parse PSQL profile file for p in pp: if p.key == "omero.db.profile": psql_file = self.dir / "etc" / "profiles" / p.val pp.parse_file(str(psql_file.abspath())) break # Parse OMERO.web configuration properties if not args.no_web: pp.parse_module('omeroweb.settings') # Display options if args.headers: pp.print_headers() elif args.keys: pp.print_keys() elif args.rst: pp.print_rst() else: pp.print_defaults()
def parse(self, args): if args.file: args.file.close() cfg = path(args.file.name) else: cfg = self.dir / "etc" / "omero.properties" from omero.install.config_parser import PropertyParser pp = PropertyParser() pp.parse(str(cfg.abspath())) if args.headers: pp.print_headers() elif args.keys: pp.print_keys() elif args.rst: pp.print_rst() else: pp.print_defaults()