From: Ian Jackson Date: Fri, 18 Oct 2019 20:29:18 +0000 (+0100) Subject: make-secnet-sites: Fix python path manipulation X-Git-Tag: v0.5.0~36 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=54f6da7897edddcd7b40533e3495d8f757351a79 make-secnet-sites: Fix python path manipulation This makes it possible to set PYTHONPATH to prefer the in-tree modules. Signed-off-by: Ian Jackson --- diff --git a/make-secnet-sites b/make-secnet-sites index d6f9ee0..ea2dbc3 100755 --- a/make-secnet-sites +++ b/make-secnet-sites @@ -62,8 +62,10 @@ import re import ipaddr -sys.path.insert(0,"/usr/local/share/secnet") -sys.path.insert(0,"/usr/share/secnet") +# entry 0 is "near the executable", or maybe from PYTHONPATH=., +# which we don't want to preempt +sys.path.insert(1,"/usr/local/share/secnet") +sys.path.insert(1,"/usr/share/secnet") import ipaddrset VERSION="0.1.18"