mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Return the changed path as an argument to the watch callback. This is useful
for the test CD, and simplifies DevController everso slightly. It ought to be generally useful, too. Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
124d92e3b0
commit
78d2a7ffe3
4 files changed
+4
-4
No files matched your search
@@ -114,7 +114,7 @@ class XendDomain:
|
||||
|
||||
## private:
|
||||
|
||||
def onReleaseDomain(self):
|
||||
def onReleaseDomain(self, _):
|
||||
self.domains_lock.acquire()
|
||||
try:
|
||||
self.refresh()
|
||||
|
||||
@@ -424,7 +424,7 @@ class XendDomainInfo:
|
||||
return []
|
||||
|
||||
|
||||
def storeChanged(self):
|
||||
def storeChanged(self, _):
|
||||
log.trace("XendDomainInfo.storeChanged");
|
||||
|
||||
changed = False
|
||||
|
||||
@@ -328,7 +328,7 @@ class DevController:
|
||||
ev = Event()
|
||||
result = { 'status': Timeout }
|
||||
|
||||
xswatch(statusPath, hotplugStatusCallback, statusPath, ev, result)
|
||||
xswatch(statusPath, hotplugStatusCallback, ev, result)
|
||||
|
||||
ev.wait(DEVICE_CREATE_TIMEOUT)
|
||||
return result['status']
|
||||
|
||||
@@ -51,7 +51,7 @@ def watchMain():
|
||||
try:
|
||||
we = xs.read_watch()
|
||||
watch = we[1]
|
||||
res = watch.fn(*watch.args, **watch.kwargs)
|
||||
res = watch.fn(we[0], *watch.args, **watch.kwargs)
|
||||
if not res:
|
||||
watch.unwatch()
|
||||
except:
|
||||
|
||||