From 30cdc5e74b1d5195e0fbe369cf38a008cca2c2d1 Mon Sep 17 00:00:00 2001 From: Brian May Date: Sun, 24 Apr 2022 16:42:47 +1000 Subject: [PATCH] Fix LGTM reported issues --- setup.py | 2 +- sshuttle/cmdline.py | 3 ++- sshuttle/methods/__init__.py | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 74c9238..22b75a5 100755 --- a/setup.py +++ b/setup.py @@ -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):