fixed askChoice

master 3.7.1.2
idzuibenko 3 years ago
parent 0e890e2a34
commit 6063626727

@ -365,9 +365,7 @@ def getRunProc():
if not os.access('/proc', os.R_OK):
return []
return map(getCmd,
list(filter(lambda x: x.isdigit(),
listDirectory('/proc'))))
return [getCmd(x) for x in listDirectory('/proc') if x.isdigit()]
def owner(pid):

@ -324,9 +324,8 @@ class MessageDispatcher(object):
def ask_choice(self, message):
message, answers = message.message.split('|')
answers = map(lambda x: (x[0], x[1].strip(')')),
map(lambda x: x.split('('),
answers.split(',')))
answers = [(x[0], x[1].strip(')')) for x
in (y.split('(') for y in answers.split(','))]
answer = self.methods.askChoice(message, answers)
self.parent.send_message(answer)

Loading…
Cancel
Save