Redundant conditional removal

The checks for types of the arguments are implemented
in the function called in the subsequent statement.

As there is no scenario in which one set of these checks
passes, while the other fails with the same values,
we can consider one of them to be redundant.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I9a7a50ad02a4814d85b63fd9001d85fd1122946b
This commit is contained in:
Jiri Podivin 2021-07-28 16:48:40 +02:00
parent 07e484a861
commit 01e2517c79
1 changed files with 1 additions and 20 deletions

View File

@ -546,7 +546,7 @@ class ValidationActions(object):
:return: A JSON or a YAML dump (By default, JSON).
if `download_file` is used, a file containing only the
parameters will be created in the file system.
:exemple:
:example:
>>> validations = ['check-cpu', 'check-ram']
>>> groups = None
@ -568,25 +568,6 @@ class ValidationActions(object):
}
}
"""
if not validations:
validations = []
elif not isinstance(validations, list):
raise TypeError("The 'validations' argument must be a List")
if not groups:
groups = []
elif not isinstance(groups, list):
raise TypeError("The 'groups' argument must be a List")
if not categories:
categories = []
elif not isinstance(categories, list):
raise TypeError("The 'categories' argument must be a List")
if not products:
products = []
elif not isinstance(products, list):
raise TypeError("The 'products' argument must be a List")
supported_format = ['json', 'yaml']