From 6de9b3e05bac760af4f4613db358d9fbddd9830c Mon Sep 17 00:00:00 2001 From: Jrohy <1101400284jackie@gmail.com> Date: Sun, 23 Dec 2018 18:04:38 +0800 Subject: [PATCH] fix del :bug: --- selector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selector.py b/selector.py index 59a3d443..215560d2 100644 --- a/selector.py +++ b/selector.py @@ -73,8 +73,8 @@ def select_client(self): class GroupSelector(Selector): def __init__(self, action): super(GroupSelector, self).__init__(action) - if "删除" in action and self.group_list[-1].node_list[-1].user_number == 1: - print(color_str(Color.RED, "仅剩最后一个节点无法删除!!!")) + if "删除" in action and len(self.group_list) == 1: + print(color_str(Color.RED, "仅剩最后一个端口无法删除!!!")) self.group = None elif len(self.group_list) > 1: self.select_group()