chiark / gitweb /
Python IP addresses: Remove sys.path hacking from test script
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Sep 2014 23:14:41 +0000 (00:14 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 2 Oct 2014 15:30:22 +0000 (16:30 +0100)
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 <ijackson@chiark.greenend.org.uk>
ipaddrset-test.py

index 12663bc..a561db1 100755 (executable)
@@ -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