Fix cull_zombies() for sessions with non-numeric names

This commit is contained in:
Chow Loong Jin 2017-10-05 13:29:38 +08:00
commit 72e8630b1d

View file

@ -102,7 +102,7 @@ def cull_zombies(session_name):
# Find the master session to extract the group number. We use
# the group number to be extra sure the right session is getting
# killed. We don't want to accidentally kill the wrong one
pattern = "^%s:.+\\((group \\d+)\\).*$" % session_name
pattern = "^%s:.+\\((group [^\\)]+)\\).*$" % session_name
master = re.search(pattern, output, re.MULTILINE)
if not master:
return