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:
Grant Likely 2016-06-17 13:33:26 +01:00
commit 362f849d62

View file

@ -85,6 +85,7 @@ def get_sessions():
i += 1
return sessions
def cull_zombies(session_name):
# When using tmux session groups, closing a client will leave
# unattached "zombie" sessions that will never be reattached.
@ -109,9 +110,9 @@ def cull_zombies(session_name):
# Kill all the matching hidden & unattached sessions
pattern = "^_%s-\\d+:.+\\(%s\\)$" % (session_name, master.group(1))
for s in re.findall(pattern, output, re.MULTILINE):
print("Killing", s.split(":")[0]);
subprocess.Popen(["tmux", "kill-session", "-t", s.split(":")[0]])
def update_environment(session):
backend, session_name = session.split("____", 2)
for var in BYOBU_UPDATE_ENVVARS: