batch: do not crash when no argument is specified

https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta 2016-05-19 11:35:23 +02:00
parent 278fa29906
commit f8cf136c55

View File

@ -89,7 +89,7 @@ class batch(Command):
def execute(self, *args, **options):
results = []
for arg in args[0]:
for arg in (args[0] or []):
params = dict()
name = None
try: