Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def with_services(self, services):
"""return a similar PgctlApp, but with a different set of services"""
newconf = dict(self.pgconf)
newconf['services'] = services
return PgctlApp(newconf)
def main(argv=None):
p = parser()
args = p.parse_args(argv)
config = Config('pgctl')
config = config.combined(PGCTL_DEFAULTS, args)
app = PgctlApp(config)
return app()
def parser():
commands = [command.__name__ for command in PgctlApp.commands]
parser = argparse.ArgumentParser()
parser.add_argument('--version', action='version', version=__version__)
parser.add_argument(
'--verbose',
action='store_true',
default=False,
help='show additional service action information',
)
parser.add_argument('--pgdir', help='name the playground directory', default=argparse.SUPPRESS)
parser.add_argument('--pghome', help='directory to keep user-level playground state', default=argparse.SUPPRESS)
parser.add_argument(
'--json', action='store_true', default=False,
help='output in JSON (only supported by some commands)',
)
parser.add_argument(
'--force', action='store_true', default=False,