diff options
author | vieira <vieira@yubo.be> | 2017-11-11 01:30:58 +0000 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2017-11-13 11:58:43 +1100 |
commit | 71d65f38311f625bb9f517551b4c1a29f3b924eb (patch) | |
tree | ed0224942a28e3f055366d36c71e62334247a076 /sshuttle/options.py | |
parent | 9f238ebca820415bb36aba4cbefa4c605f080791 (diff) |
Fixes some style issues and minor bugs
Diffstat (limited to 'sshuttle/options.py')
-rw-r--r-- | sshuttle/options.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sshuttle/options.py b/sshuttle/options.py index 9448b02..a1fd57e 100644 --- a/sshuttle/options.py +++ b/sshuttle/options.py @@ -13,9 +13,9 @@ def parse_subnetport_file(s): raw_config_lines = handle.readlines() subnets = [] - for line_no, line in enumerate(raw_config_lines): + for _, line in enumerate(raw_config_lines): line = line.strip() - if len(line) == 0: + if not line: continue if line[0] == '#': continue @@ -81,8 +81,8 @@ def parse_ipport(s): return (family,) + addr[:2] -def parse_list(list): - return re.split(r'[\s,]+', list.strip()) if list else [] +def parse_list(lst): + return re.split(r'[\s,]+', lst.strip()) if lst else [] class Concat(Action): @@ -120,7 +120,8 @@ parser.add_argument( "-H", "--auto-hosts", action="store_true", help=""" - continuously scan for remote hostnames and update local /etc/hosts as they are found + continuously scan for remote hostnames and update local /etc/hosts as + they are found """ ) parser.add_argument( @@ -151,7 +152,8 @@ parser.add_argument( metavar="IP[:PORT]", type=parse_ipport, help=""" - the DNS server to forward requests to; defaults to servers in /etc/resolv.conf on remote side if not given. + the DNS server to forward requests to; defaults to servers in + /etc/resolv.conf on remote side if not given. """ ) @@ -227,7 +229,8 @@ parser.add_argument( metavar="HOSTNAME[,HOSTNAME]", default=[], help=""" - comma-separated list of hostnames for initial scan (may be used with or without --auto-hosts) + comma-separated list of hostnames for initial scan (may be used with + or without --auto-hosts) """ ) parser.add_argument( |