If netstat -rn returns an error, make that non-fatal.

That only really stops --auto-nets from working; it's mostly harmless
otherwise.  And apparently some locked-down shared hosts don't let you get
the list of routes.
This commit is contained in:
Avery Pennarun 2010-09-04 11:29:11 -07:00
parent ee74110cff
commit dcba684766

View File

@ -57,7 +57,8 @@ def _list_routes():
routes.append((socket.inet_ntoa(struct.pack('!I', ip)), width))
rv = p.wait()
if rv != 0:
raise Fatal('%r returned %d' % (argv, rv))
log('WARNING: %r returned %d\n' % (argv, rv))
log('WARNING: That prevents --auto-nets from working.\n')
return routes