summaryrefslogtreecommitdiff
path: root/cloudinit/cmd/main.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-06-14 15:00:40 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-06-14 15:00:40 -0700
commit4dbfc55a6c90aee390ab981b0d4775d8b94e4803 (patch)
tree5ddc19207f2f3c497a92f2340056c2e657ea3bfa /cloudinit/cmd/main.py
parent628eaedba94dae953f6e0c0469881d9eb417cafe (diff)
downloadvyos-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-xcloudinit/cmd/main.py10
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