Fix desktop

master3.3
parent dcce263cf9
commit 703bdcac06

@ -162,7 +162,7 @@ class VariableClDesktopOnlineData(ReadonlyTableVariable):
source = ['cl_desktop_online_user', source = ['cl_desktop_online_user',
'cl_desktop_online_display'] 'cl_desktop_online_display']
reDisplay = re.compile(r"^\(?:(\d+.?\d*)") reDisplay = re.compile(r"^\(?:(\d+\.?\d*)")
def _getDisplay(self,*args): def _getDisplay(self,*args):
""" """
@ -179,8 +179,8 @@ class VariableClDesktopOnlineData(ReadonlyTableVariable):
resWho = process("who") resWho = process("who")
xData = [[]] xData = [[]]
if resWho.success(): if resWho.success():
listProcessing = lambda x: (x[0], x[1], x[4])\ listProcessing = lambda x: (x[0], x[1], x[-1]) \
if len(x)==5 else [] if len(x)>=5 else []
xData = map(lambda x:x[1].next(), xData = map(lambda x:x[1].next(),
groupby( groupby(
sorted( sorted(
@ -190,7 +190,7 @@ class VariableClDesktopOnlineData(ReadonlyTableVariable):
(x[2].startswith("(:") or \ (x[2].startswith("(:") or \
x[1].startswith(":")), x[1].startswith(":")),
map(lambda x: listProcessing(\ map(lambda x: listProcessing(\
filter(lambda y: y, x.split(" "))), filter(lambda y: y, x.split())),
resWho)))), resWho)))),
key=lambda x:x[0]), key=lambda x:x[0]),
lambda x:x[0])) lambda x:x[0]))

Loading…
Cancel
Save