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.v1~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=commitdiff_plain;h=6edda96fc993f213d08a80d6366c47c556b9db1e;hp=e6f93f9e5f8a6920ac7c929a944085f46a8c355a 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 12663bc..a561db1 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