Activity log for bug #1424277

Date Who What changed Old value New value Message
2015-02-21 22:25:06 Miro Hrončok bug added bug
2015-02-21 22:28:40 Miro Hrončok description I'm trying to run the current trunk on Python 3. When I run cloud-init with no arguments, I get the following exception. $ python3 bin/cloud-init Traceback (most recent call last): File "bin/cloud-init", line 623, in <module> sys.exit(main()) File "bin/cloud-init", line 614, in main (name, functor) = args.action AttributeError: 'Namespace' object has no attribute 'action' This is caused by a chenge of behavior of argparse on Python 3 when using subparsers. Can we workarounded by adding try-catch similar to this one: try: (name, functor) = args.action except AttributeError: parser.print_help() return 0 (Consider it public domain, as it is so simple) I'm trying to run the current trunk on Python 3. When I run cloud-init with no arguments, I get the following exception.     $ python3 bin/cloud-init     Traceback (most recent call last):       File "bin/cloud-init", line 623, in <module>         sys.exit(main())       File "bin/cloud-init", line 614, in main         (name, functor) = args.action     AttributeError: 'Namespace' object has no attribute 'action' This is caused by a chenge of behavior of argparse on Python 3 when using subparsers. Can be workarounded by adding try-catch similar to this one:         try:             (name, functor) = args.action         except AttributeError:             parser.print_help()             return 0 (Consider it public domain, as it is so simple)
2015-02-21 22:31:48 Miro Hrončok description I'm trying to run the current trunk on Python 3. When I run cloud-init with no arguments, I get the following exception.     $ python3 bin/cloud-init     Traceback (most recent call last):       File "bin/cloud-init", line 623, in <module>         sys.exit(main())       File "bin/cloud-init", line 614, in main         (name, functor) = args.action     AttributeError: 'Namespace' object has no attribute 'action' This is caused by a chenge of behavior of argparse on Python 3 when using subparsers. Can be workarounded by adding try-catch similar to this one:         try:             (name, functor) = args.action         except AttributeError:             parser.print_help()             return 0 (Consider it public domain, as it is so simple) I'm trying to run the current trunk on Python 3. When I run cloud-init with no arguments, I get the following exception.     $ python3 bin/cloud-init     Traceback (most recent call last):       File "bin/cloud-init", line 623, in <module>         sys.exit(main())       File "bin/cloud-init", line 614, in main         (name, functor) = args.action     AttributeError: 'Namespace' object has no attribute 'action' This is caused by a change of behavior of argparse on Python 3 when using subparsers. Can be workarounded by adding try-catch similar to this one:         try:             (name, functor) = args.action         except AttributeError:             parser.print_help()             return 0 (Consider it public domain, as it is so simple)
2015-02-26 15:27:05 Dan Watkins cloud-init: status New In Progress
2015-02-26 15:27:07 Dan Watkins cloud-init: assignee Daniel Watkins (daniel-thewatkins)
2015-02-26 15:27:57 Dan Watkins branch linked lp:~daniel-thewatkins/cloud-init/fix-no-args
2015-05-01 09:50:08 Launchpad Janitor branch linked lp:cloud-init
2015-05-05 16:16:37 Dan Watkins cloud-init: status In Progress Fix Committed
2015-11-09 11:09:24 Dan Watkins cloud-init: status Fix Committed Fix Released
2023-05-10 06:16:32 James Falcon bug watch added https://github.com/canonical/cloud-init/issues/2525