DRYer
This commit is contained in:
parent
dc888a87d6
commit
adaa00744c
1 changed files with 2 additions and 3 deletions
|
|
@ -423,11 +423,10 @@ def background_processes(self) -> list[ProcessDesc]:
|
|||
sid = session_id(gmap.get(foreground_process_group_id, ()))
|
||||
if sid < 0:
|
||||
return []
|
||||
ans = []
|
||||
ans: list[ProcessDesc] = []
|
||||
for grp_id, pids in gmap.items():
|
||||
if grp_id != foreground_process_group_id and session_id(pids) == sid:
|
||||
for pid in pids:
|
||||
ans.append(self.process_desc(pid))
|
||||
ans.extend(map(self.process_desc, pids))
|
||||
return ans
|
||||
except Exception:
|
||||
return []
|
||||
|
|
|
|||
Loading…
Reference in a new issue