diff options
author | Brian May <brian@linuxpenguins.xyz> | 2022-04-24 16:42:47 +1000 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2022-04-24 16:43:07 +1000 |
commit | 30cdc5e74b1d5195e0fbe369cf38a008cca2c2d1 (patch) | |
tree | 42e9164e6c2bce1df1aaec482d564b968d2cdcbe | |
parent | 181bf648a7334a42dda0a2b696ced4867ebe08b8 (diff) |
Fix LGTM reported issues
-rwxr-xr-x | setup.py | 2 | ||||
-rw-r--r-- | sshuttle/cmdline.py | 3 | ||||
-rw-r--r-- | sshuttle/methods/__init__.py | 4 |
3 files changed, 4 insertions, 5 deletions
@@ -46,7 +46,7 @@ setup( "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", - "License :: OSI Approved :: " + "License :: OSI Approved :: " + "GNU Lesser General Public License v2 or later (LGPLv2+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.8", diff --git a/sshuttle/cmdline.py b/sshuttle/cmdline.py index c619cd1..b7ea43f 100644 --- a/sshuttle/cmdline.py +++ b/sshuttle/cmdline.py @@ -33,7 +33,8 @@ def main(): parser.error('exactly zero arguments expected') return firewall.main(opt.method, opt.syslog) elif opt.hostwatch: - return hostwatch.hw_main(opt.subnets, opt.auto_hosts) + hostwatch.hw_main(opt.subnets, opt.auto_hosts) + return 0 else: # parse_subnetports() is used to create a list of includes # and excludes. It is called once for each parameter and diff --git a/sshuttle/methods/__init__.py b/sshuttle/methods/__init__.py index b1fdeab..9aaf62e 100644 --- a/sshuttle/methods/__init__.py +++ b/sshuttle/methods/__init__.py @@ -7,8 +7,6 @@ from sshuttle.helpers import Fatal, debug3 def original_dst(sock): - ip = "0.0.0.0" - port = -1 try: family = sock.family SO_ORIGINAL_DST = 80 @@ -73,7 +71,7 @@ class BaseMethod(object): def send_udp(self, sock, srcip, dstip, data): if srcip is not None: raise Fatal("Method %s send_udp does not support setting srcip to %r" - % (self.name, srcip)) + % (self.name, srcip)) sock.sendto(data, dstip) def setup_tcp_listener(self, tcp_listener): |