mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-27 11:41:52 +03:00
override: no type change
static typing forbids re-declaring a variable with different types. Rename the variable. Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
committed by
Daniel Berrange
parent
abbd47f4ea
commit
051a00c212
@ -179,12 +179,13 @@ def _eventInvokeHandleCallback(watch: int, fd: int, event: int, opaque: Union[Tu
|
||||
# future invocations match the virEventHandleCallback prototype
|
||||
if opaquecompat:
|
||||
callback = opaque
|
||||
opaque = opaquecompat
|
||||
opaque_ = opaquecompat
|
||||
else:
|
||||
assert isinstance(opaque, tuple)
|
||||
callback = opaque[0]
|
||||
opaque = opaque[1]
|
||||
opaque_ = opaque[1]
|
||||
|
||||
libvirtmod.virEventInvokeHandleCallback(watch, fd, event, callback, opaque)
|
||||
libvirtmod.virEventInvokeHandleCallback(watch, fd, event, callback, opaque_)
|
||||
|
||||
|
||||
#
|
||||
@ -200,12 +201,13 @@ def _eventInvokeTimeoutCallback(timer: int, opaque: Union[Tuple[_TimerCB, _T], _
|
||||
# future invocations match the virEventTimeoutCallback prototype
|
||||
if opaquecompat:
|
||||
callback = opaque
|
||||
opaque = opaquecompat
|
||||
opaque_ = opaquecompat
|
||||
else:
|
||||
assert isinstance(opaque, tuple)
|
||||
callback = opaque[0]
|
||||
opaque = opaque[1]
|
||||
opaque_ = opaque[1]
|
||||
|
||||
libvirtmod.virEventInvokeTimeoutCallback(timer, callback, opaque)
|
||||
libvirtmod.virEventInvokeTimeoutCallback(timer, callback, opaque_)
|
||||
|
||||
|
||||
def _dispatchEventHandleCallback(watch: int, fd: int, events: int, cbData: Dict[str, Any]) -> int:
|
||||
|
Reference in New Issue
Block a user