diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-06-14 15:00:40 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-06-14 15:00:40 -0700 |
commit | 4dbfc55a6c90aee390ab981b0d4775d8b94e4803 (patch) | |
tree | 5ddc19207f2f3c497a92f2340056c2e657ea3bfa /cloudinit/cmd/main.py | |
parent | 628eaedba94dae953f6e0c0469881d9eb417cafe (diff) | |
download | vyos-cloud-init-4dbfc55a6c90aee390ab981b0d4775d8b94e4803.tar.gz vyos-cloud-init-4dbfc55a6c90aee390ab981b0d4775d8b94e4803.zip |
Don't continue running with no action
Diffstat (limited to 'cloudinit/cmd/main.py')
-rwxr-xr-x | cloudinit/cmd/main.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/cmd/main.py b/cloudinit/cmd/main.py index c8916e03..2bd75328 100755 --- a/cloudinit/cmd/main.py +++ b/cloudinit/cmd/main.py @@ -646,6 +646,11 @@ def main(sysv_args=None): args = parser.parse_args(args=sysv_args) + try: + (name, functor) = args.action + except AttributeError: + parser.error('too few arguments') + # Setup basic logging to start (until reinitialized) # iff in debug mode... if args.debug: @@ -654,11 +659,6 @@ def main(sysv_args=None): # Setup signal handlers before running signal_handler.attach_handlers() - try: - (name, functor) = args.action - except AttributeError: - parser.error('too few arguments') - if name in ("modules", "init"): functor = status_wrapper |