mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-15 20:59:34 +03:00
Fix error check for virDomainGetTime method
The virDomainGetTime returns either a dict or None, but the python glue layer for checking for '-1'. Thus it failed to raise an exception on error. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@ -63,7 +63,7 @@
|
||||
def getTime(self, flags=0):
|
||||
"""Extract information about guest time """
|
||||
ret = libvirtmod.virDomainGetTime(self._o, flags)
|
||||
if ret == -1: raise libvirtError ('virDomainGetTime() failed', dom=self)
|
||||
if ret == None: raise libvirtError ('virDomainGetTime() failed', dom=self)
|
||||
return ret
|
||||
|
||||
def setTime(self, time=None, flags=0):
|
||||
|
Reference in New Issue
Block a user