qmemman: fix list/filter handling on python3
Filter in python3 returns a generator, can be iterated only once. This is about list of existing domains - store it as a list, otherwise domains will "disappear" after being discovered.
This commit is contained in:
parent
58e58e0ca7
commit
0ef010cc70
@ -103,13 +103,13 @@ class XS_Watcher(object):
|
||||
|
||||
# check if domain is really there, it may happen that some empty
|
||||
# directories are left in xenstore
|
||||
curr = filter(
|
||||
curr = list(filter(
|
||||
lambda x:
|
||||
self.handle.read('',
|
||||
'/local/domain/{}/domid'.format(x)
|
||||
) is not None,
|
||||
curr
|
||||
)
|
||||
))
|
||||
self.log.debug('curr={!r}'.format(curr))
|
||||
|
||||
for i in only_in_first_list(curr, self.watch_token_dict.keys()):
|
||||
|
Loading…
Reference in New Issue
Block a user