KojiClient is responsible for getting information and files on koji/brew. The is_pkg_valid() method was checking for valid tags and valid builds even when they were not set. Of couse, if neither are set, the package specification is not valid.
Signed-off-by: Cleber Rosa <[email protected]> --- client/virt/virt_utils.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/virt/virt_utils.py b/client/virt/virt_utils.py index 5510c89..0f02f3d 100644 --- a/client/virt/virt_utils.py +++ b/client/virt/virt_utils.py @@ -1796,9 +1796,13 @@ class KojiClient(object): @returns: True or False ''' valid = True - if not self.is_pkg_spec_build_valid(pkg): - valid = False - if not self.is_pkg_spec_tag_valid(pkg): + if pkg.build: + if not self.is_pkg_spec_build_valid(pkg): + valid = False + elif pkg.tag: + if not self.is_pkg_spec_tag_valid(pkg): + valid = False + else: valid = False return valid -- 1.7.4.4 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
