ceph-volume: lvm: print help and return before parsing args if no args

Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
Alfredo Deza 2017-07-14 13:28:14 -04:00
parent 6a45e248ae
commit dad18970cb

View File

@ -98,7 +98,8 @@ class Activate(object):
action='store_true', default=True,
help='filestore objectstore (current default)',
)
args = parser.parse_args(self.argv[1:])
if len(self.argv) <= 1:
return parser.print_help()
if len(self.argv) == 0:
print sub_command_help
return
args = parser.parse_args(self.argv)
self.activate(args)