summaryrefslogtreecommitdiffstats
path: root/sshuttle/options.py
diff options
context:
space:
mode:
authorKees Hink <kees@fourdigits.nl>2021-02-15 18:01:11 +0100
committerBrian May <brian@linuxpenguins.xyz>2021-02-16 07:51:32 +1100
commit0e51da519fe5e277fd77ac7860a4f39b5f7e5e78 (patch)
tree7d75d5921b08cc944457e773f57a722971e769fb /sshuttle/options.py
parenta22c453d5eef0a196ac3b157a8269ef00d2fa0ec (diff)
Allow comments in configuration file
Diffstat (limited to 'sshuttle/options.py')
-rw-r--r--sshuttle/options.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sshuttle/options.py b/sshuttle/options.py
index 7c6b0b0..42e3ffe 100644
--- a/sshuttle/options.py
+++ b/sshuttle/options.py
@@ -152,6 +152,10 @@ class Concat(Action):
# beginning/end of the lines.
class MyArgumentParser(ArgumentParser):
def convert_arg_line_to_args(self, arg_line):
+ # Ignore comments
+ if arg_line.startswith("#"):
+ return []
+
# strip whitespace at beginning and end of line
arg_line = arg_line.strip()