mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-08 21:18:04 +03:00
Do not compare between None and int
In Python 2 comparison between int and None is allowed but in Pyhton 3 it is not. Example: Pyhton 2 >>> None > 0 False Python 3 >>> None > 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: '>' not supported between instances of 'NoneType' and 'int'
This commit is contained in:
parent
75210ed37c
commit
a2bcd6c43a
@ -181,7 +181,7 @@ def diff_compare(actual_out, filename=None, expect_out=None):
|
||||
|
||||
diff = "".join(difflib.unified_diff(expect_out.splitlines(1),
|
||||
actual_out.splitlines(1),
|
||||
fromfile=filename,
|
||||
fromfile=filename or '',
|
||||
tofile="Generated Output"))
|
||||
if diff:
|
||||
raise AssertionError("Conversion outputs did not match.\n%s" % diff)
|
||||
|
@ -187,7 +187,8 @@ class _SupportCheck(object):
|
||||
actual_hv_version = conn.conn_version()
|
||||
|
||||
# Check that local libvirt version is sufficient
|
||||
if _version_str_to_int(self.version) > actual_libvirt_version:
|
||||
v = _version_str_to_int(self.version)
|
||||
if v and (v > actual_libvirt_version):
|
||||
return False
|
||||
|
||||
if self.hv_version:
|
||||
|
Loading…
Reference in New Issue
Block a user