Browse Source

fixed askChoice

master 3.7.1.2
idzuibenko 8 months ago
parent
commit
6063626727
  1. 4
      pym/console/application/cert_func.py
  2. 5
      pym/console/application/function.py

4
pym/console/application/cert_func.py

@ -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):

5
pym/console/application/function.py

@ -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