From 824678651b0d447f76992754a58714e61c7ee5bc Mon Sep 17 00:00:00 2001 From: Laurie Clark-Michalek Date: Sat, 17 Sep 2011 22:19:37 +0100 Subject: Fixed actual problem with process check module --- archey3 | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/archey3 b/archey3 index 666a9eb..4acb7c4 100644 --- a/archey3 +++ b/archey3 @@ -414,29 +414,24 @@ class distroCheck(display): @module_register("process") class processCheck(display): - command_line = "ps -u {arg1}" + command_line = "ps -u " + getuser() render = lambda self: self - def __init__(self, **kwargs): - self.arg1 = getuser() - super().__init__(**kwargs) - def run_command(self): super().run_command() out = str(self.process.communicate()[0]) self._processes = set() + import pdb; pdb.set_trace() for line in out.split("\\n"): + print(line) words = line.split() - if len(words) <= 10: + if len(words) <= 3: continue - # Ignore the wrapper command - if words[10] == 'ck-launch-session': - words[10] = words[11] - - self._processes.add(words[10]) + self._processes.add(words[3]) + print(self._processes) def __call__(self, proc): if proc in self._processes: -- cgit v1.2.3-54-g00ecf