commit 1191c783b2147722925976251d9e808d8f7c56a2
Author: Yi Yang <[email protected]>
Date: Thu Mar 3 00:30:15 2011 +0800
Fix no_proxy parsing issue in case whitespace is included
Note: on some systems, there are whitespaces included in no_proxy
environment variable, it looks like:
export no_proxy="127.0.0.0/8, .xxx.com, 192.168.0.0 / 24 "
this commit enables mic2 parse such format correctly.
diff --git a/mic/imgcreate/misc.py b/mic/imgcreate/misc.py
index f78929a..8ad9440 100644
--- a/mic/imgcreate/misc.py
+++ b/mic/imgcreate/misc.py
@@ -345,14 +345,15 @@ def set_noproxy_list():
if not _my_noproxy:
return
for item in _my_noproxy.split(","):
+ item = item.strip()
if not item:
continue
if item[0] != '.' and item.find("/") == -1:
""" Need to match it """
- _my_noproxy_list.append({"match":0,"needle":item.strip()})
+ _my_noproxy_list.append({"match":0,"needle":item})
elif item[0] == '.':
""" Need to match at tail """
- _my_noproxy_list.append({"match":1,"needle":item.strip()})
+ _my_noproxy_list.append({"match":1,"needle":item})
elif item.find("/") > 3:
""" IP/MASK, need to match at head """
needle = item[0:item.find("/")].strip()
_______________________________________________
MeeGo-distribution-tools mailing list
[email protected]
http://lists.meego.com/listinfo/meego-distribution-tools