Commit c40694a6 authored by Guillaume Bury's avatar Guillaume Bury

Comments are possible in config files

parent ef42f40f
......@@ -8,3 +8,4 @@ The organisation of the code
tunnel.py To choose wich connection delete/keep/...
upnpigd.py To open a port
......@@ -7,9 +7,11 @@ import db, plib, upnpigd, utils, tunnel
class ArgParser(ArgumentParser):
def convert_arg_line_to_args(self, arg_line):
for arg in ('--' + arg_line.lstrip('--')).split():
if arg.strip():
yield arg
arg_line = arg_line.split('#')[0].rstrip()
if arg_line:
for arg in ('--' + arg_line.lstrip('--')).split():
if arg.strip():
yield arg
def ovpnArgs(optional_args, ca_path, cert_path):
# Treat openvpn arguments
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment