diff options
Diffstat (limited to 'examples/argparse_example.py')
-rwxr-xr-x | examples/argparse_example.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/argparse_example.py b/examples/argparse_example.py index 48adca52..9f6548de 100755 --- a/examples/argparse_example.py +++ b/examples/argparse_example.py @@ -65,13 +65,13 @@ class CmdLineApp(Cmd): do_orate = do_speak # another synonym, but this one takes multi-line input tag_parser = argparse.ArgumentParser() - tag_parser.add_argument('tag', nargs=1, help='tag') + tag_parser.add_argument('tag', help='tag') tag_parser.add_argument('content', nargs='+', help='content to surround with tag') @with_argument_parser(tag_parser) def do_tag(self, args): """create a html tag""" - self.poutput('<{0}>{1}</{0}>'.format(args.tag[0], ' '.join(args.content))) + self.poutput('<{0}>{1}</{0}>'.format(args.tag, ' '.join(args.content))) @with_argument_list |