Fixes: #1569
Change-Id: Ic40c32ceaed78e59947af7f185e00e84ccbb30b8
Signed-off-by: Gui Chen <gui.chen@intel.com>
# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import os
+import re
import urlparse
_my_proxies = {}
hostisip = _isip(host)
for item in _my_noproxy_list:
- if hostisip and item["match"] <= 1:
+ if hostisip and item["match"] == 1:
continue
if item["match"] == 2 and hostisip:
return True
if item["match"] == 1:
- if host.rfind(item["needle"]) > 0:
+ if re.match(r".*%s$" % item["needle"], host):
return True
return False