From: Ian Jackson Date: Sun, 14 Sep 2014 23:14:41 +0000 (+0100) Subject: Python IP addresses: Remove sys.path hacking from test script X-Git-Tag: base.polypath.v4~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=commitdiff_plain;h=03847a23f64d1b19254335646bf09220f66ac8f9 Python IP addresses: Remove sys.path hacking from test script Now that we no longer have ipaddr.py in our tree, we can get rid of this messing about with sys.path. We use the system's ipaddr.py and our own ipaddrset.py. Signed-off-by: Ian Jackson --- diff --git a/ipaddrset-test.py b/ipaddrset-test.py index 290144b..3f4a248 100755 --- a/ipaddrset-test.py +++ b/ipaddrset-test.py @@ -1,18 +1,8 @@ #!/usr/bin/python -import sys -import copy -import os -saved_path=copy.copy(sys.path) -for p in ['','.',os.getcwd()]: - try: sys.path.remove(p) - except ValueError: pass - import ipaddr from ipaddr import IPNetwork, IPAddress -sys.path=saved_path - import ipaddrset from ipaddrset import IPAddressSet