20 lines
641 B
Diff
20 lines
641 B
Diff
--- cloudinit/cmd/main.py.orig
|
|
+++ cloudinit/cmd/main.py
|
|
@@ -1334,8 +1334,14 @@ def all_stages(parser):
|
|
|
|
def sub_main(args):
|
|
|
|
- # Subparsers.required = True and each subparser sets action=(name, functor)
|
|
- (name, functor) = args.action
|
|
+ try:
|
|
+ # Subparsers.required = True
|
|
+ # and each subparser sets action=(name, functor)
|
|
+ (name, functor) = args.action
|
|
+ except AttributeError:
|
|
+ print('No Subcommand specified. Please specify a subcommand '
|
|
+ 'in addition to the option')
|
|
+ sys.exit(1)
|
|
|
|
# Setup basic logging for cloud-init:
|
|
# - for cloud-init stages if --debug
|