OPTIONS
+ --output-version NUMBER
+
+ Write backward-compatible sites file output,
+ targeting a particular sites format. Values of
+ NUMBER that are understood are:
+ 1 The original format, pre signing key
+ negotiation.
+ If NUMBER is higher than make-secnet-sites supports,
+ it writes out what it can.
+
--debug | -D
Increase amount of debugging output.
VERSION="0.1.18"
+max_version = 1
+
from sys import version_info
if version_info.major == 2: # for python2
import codecs
global prefix
global key_prefix
global debug_level
+ global output_version
ap = argparse.ArgumentParser(description='process secnet sites files')
ap.add_argument('--userv', '-u', action='store_true',
ap.add_argument('--conf-key-prefix', action=ActionNoYes,
default=True,
help='prefix conf file key names derived from sites data')
+ ap.add_argument('--output-version', nargs=1, type=int,
+ help='sites file output version',
+ default=[max_version])
ap.add_argument('--prefix', '-P', nargs=1,
help='set prefix')
ap.add_argument('--debug', '-D', action='count', default=0)
service = 1 if av.userv else 0
prefix = '' if av.prefix is None else av.prefix[0]
key_prefix = av.conf_key_prefix
+ output_version = av.output_version[0]
if service:
if len(av.arg)!=4:
print("Wrong number of arguments")