3 from wizard import deploy, command, shell
6 options, args = parse_args(argv, baton)
7 dir = os.path.abspath(args[0]) if args else os.getcwd()
8 shell.drop_priviledges(dir, options.log_file)
9 deployment = deploy.ProductionCopy(dir)
11 deployment.verifyConfigured()
12 print deployment.dsn.database
14 def parse_args(argv, baton):
15 usage = """usage: %prog database [DIR]
17 Prints the name of the database an application is using.
18 Maybe in the future this will print more information."""
19 parser = command.WizardOptionParser(usage)
20 options, args = parser.parse_all(argv)
22 parser.error("too many arguments")
24 parser.error("must specify directory")