Skip to content

Commit bd1a2c9

Browse files
pmhahnberrange
authored andcommitted
domain: Fix None comparison
None should be compared with "is None" instead of "== None", as the later would invoke a "__cmp__()" method. Signed-off-by: Philipp Hahn <[email protected]>
1 parent fd7087f commit bd1a2c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libvirt-override-virDomain.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def fsThaw(self, mountpoints: List[str] = None, flags: int = 0) -> int:
6969
def getTime(self, flags: int = 0) -> int:
7070
"""Extract information about guest time """
7171
ret = libvirtmod.virDomainGetTime(self._o, flags)
72-
if ret == None:
72+
if ret is None:
7373
raise libvirtError('virDomainGetTime() failed')
7474
return ret
7575

0 commit comments

Comments
 (0)