Bugfix (get X users in virtual machine).

develop
Самоукин Алексей 14 years ago
parent 9b0f2dbb8f
commit c0a5c05c80

@ -132,10 +132,16 @@ class updateUserConfigs(shareUpdateConfigs):
xUsers = []
if retCode==0:
if resWho:
xUsers = map(lambda x: x[0],
filter(lambda x: x[1].startswith(":"),
map(lambda x: filter(lambda y: y,
x.split(" "))[:2] ,resWho)))
listProcessing = lambda x: (x[0], x[1], x[4])\
if len(x)==5 else []
xUsers = list(set(filter(lambda x: x!="root",
map(lambda x: x[0],
filter(lambda x: x and\
(x[2].startswith("(:") or \
x[1].startswith(":")),
map(lambda x: listProcessing(\
filter(lambda y: y, x.split(" "))),
resWho))))))
else:
self.printERROR(_("Can not execute 'who'"))
return False

Loading…
Cancel
Save