From 2a647b92491410524246cd1d9db7cef88ace451a Mon Sep 17 00:00:00 2001 From: Matthew Vliet Date: Mon, 24 Jan 2011 20:03:58 -0800 Subject: [PATCH] subcommand to generate default config for the user. --- .../repoman_client/subcommands/config.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 repoman-client/repoman_client/subcommands/config.py diff --git a/repoman-client/repoman_client/subcommands/config.py b/repoman-client/repoman_client/subcommands/config.py new file mode 100644 index 0000000..216ef45 --- /dev/null +++ b/repoman-client/repoman_client/subcommands/config.py @@ -0,0 +1,19 @@ +import ConfigParser +from repoman_client.subcommand import SubCommand +from repoman_client.config import config +from argparse import ArgumentParser + +class MakeConfig(SubCommand): + command = 'make-config' + alias = None + description = 'Generate a configuration file' + + def get_parser(self): + p = ArgumentParser(self.description) + return p + + def __call__(self, args, extra_args=None): + print "Generating new default configuration file" + config.generate_config() + print "Customization can be done be editing '%s'" % config.config_file +