mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-04-25 11:48:40 +02:00
Improve error message when "ip" and "netstat" are missing and --auto-nets fails to work
This commit is contained in:
parent
34f538ff98
commit
709e5d1595
@ -97,7 +97,6 @@ def _list_routes(argv, extract_route):
|
|||||||
rv = p.wait()
|
rv = p.wait()
|
||||||
if rv != 0:
|
if rv != 0:
|
||||||
log('WARNING: %r returned %d\n' % (argv, rv))
|
log('WARNING: %r returned %d\n' % (argv, rv))
|
||||||
log('WARNING: That prevents --auto-nets from working.\n')
|
|
||||||
|
|
||||||
return routes
|
return routes
|
||||||
|
|
||||||
@ -108,7 +107,8 @@ def list_routes():
|
|||||||
elif which('netstat'):
|
elif which('netstat'):
|
||||||
routes = _list_routes(['netstat', '-rn'], _route_netstat)
|
routes = _list_routes(['netstat', '-rn'], _route_netstat)
|
||||||
else:
|
else:
|
||||||
log('WARNING: Neither ip nor netstat were found on the server.\n')
|
log('WARNING: Neither "ip" nor "netstat" were found on the server. '
|
||||||
|
'--auto-nets feature will not work.\n')
|
||||||
routes = []
|
routes = []
|
||||||
|
|
||||||
for (family, ip, width) in routes:
|
for (family, ip, width) in routes:
|
||||||
|
Loading…
Reference in New Issue
Block a user