mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
select-session.py: fix lintian bugs
Commit 411807ef
("Add support for tmux grouped sessions) added a few
policy violations in the python code. Fix them up.
This change should be squashed into the original commit before merging
upstream.
This commit is contained in:
parent
705dbc66ec
commit
362f849d62
1 changed files with 2 additions and 1 deletions
|
@ -85,6 +85,7 @@ def get_sessions():
|
||||||
i += 1
|
i += 1
|
||||||
return sessions
|
return sessions
|
||||||
|
|
||||||
|
|
||||||
def cull_zombies(session_name):
|
def cull_zombies(session_name):
|
||||||
# When using tmux session groups, closing a client will leave
|
# When using tmux session groups, closing a client will leave
|
||||||
# unattached "zombie" sessions that will never be reattached.
|
# unattached "zombie" sessions that will never be reattached.
|
||||||
|
@ -109,9 +110,9 @@ def cull_zombies(session_name):
|
||||||
# Kill all the matching hidden & unattached sessions
|
# Kill all the matching hidden & unattached sessions
|
||||||
pattern = "^_%s-\\d+:.+\\(%s\\)$" % (session_name, master.group(1))
|
pattern = "^_%s-\\d+:.+\\(%s\\)$" % (session_name, master.group(1))
|
||||||
for s in re.findall(pattern, output, re.MULTILINE):
|
for s in re.findall(pattern, output, re.MULTILINE):
|
||||||
print("Killing", s.split(":")[0]);
|
|
||||||
subprocess.Popen(["tmux", "kill-session", "-t", s.split(":")[0]])
|
subprocess.Popen(["tmux", "kill-session", "-t", s.split(":")[0]])
|
||||||
|
|
||||||
|
|
||||||
def update_environment(session):
|
def update_environment(session):
|
||||||
backend, session_name = session.split("____", 2)
|
backend, session_name = session.split("____", 2)
|
||||||
for var in BYOBU_UPDATE_ENVVARS:
|
for var in BYOBU_UPDATE_ENVVARS:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue