]> xenbits.xensource.com Git - xtf.git/commitdiff
xtf-runner: Python3 fix when not specifying --quiet
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 27 Apr 2020 13:57:35 +0000 (14:57 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 3 Jun 2020 20:59:54 +0000 (21:59 +0100)
Andy reports:
  Combined test results:
  Traceback (most recent call last):
    File "./xtf-runner", line 716, in <module>
      sys.exit(main())
    File "./xtf-runner", line 711, in main
      return run_tests(opts)
    File "./xtf-runner", line 559, in run_tests
      if res == "SUCCESS" and opts.quiet >= 2:
  TypeError: '>=' not supported between instances of 'NoneType' and 'int'

Reported-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xtf-runner

index c4a30bc0781fd2624e69d010b800a475ea2d0644..b3df4a19067c7fb58603dd080e37eeb5bce17f4c 100755 (executable)
@@ -714,7 +714,7 @@ def main():
                               'defaults to "guest-%s.log"'),
                       )
     parser.add_option("-q", "--quiet", action = "count",
-                      dest = "quiet",
+                      dest = "quiet", default = 0,
                       help = ("Progressively make the output less verbose.  "
                               "1) No console logs, only test results.  "
                               "2) Not even SUCCESS results."),