In "make-secnet-sites: Use argparse rather than ad-hoc parser",
we missed a reference to sys.argv. The effect is that if
make-secnet-sites run in sites file output mode, and provided
with options, the output is written to the wrong place.
The only syntax that worked in 0.4.5 and broke in 0.5.0 is
make-secnet-sites -P. So here we fix that regression.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
sys.exit(1)
(inputfile, outputfile) = (av.arg + [None]*2)[0:2]
if outputfile is None: of=sys.stdout
sys.exit(1)
(inputfile, outputfile) = (av.arg + [None]*2)[0:2]
if outputfile is None: of=sys.stdout
- else: of=open(sys.argv[2],'w')
+ else: of=open(outputfile,'w')