From 2f8517190c1c71b7306267256ed0bd28b7deea58 Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Thu, 16 Jun 2016 00:17:31 +0800 Subject: [PATCH] ignore empty --- shadowsocks/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shadowsocks/common.py b/shadowsocks/common.py index afb7bbe..bfc099c 100644 --- a/shadowsocks/common.py +++ b/shadowsocks/common.py @@ -297,7 +297,8 @@ class PortRange(object): try: int_range = item.split('-') if len(int_range) == 1: - self.range.add(int(item)) + if item: + self.range.add(int(item)) elif len(int_range) == 2: int_range[0] = int(int_range[0]) int_range[1] = int(int_range[1])