This commit is contained in:
Kovid Goyal 2016-01-10 00:47:13 +05:30
parent eae72e9ec7
commit c4d3df0ed8

View File

@ -346,7 +346,7 @@ def adapters():
Route = namedtuple('Route', 'destination gateway netmask interface metric flags') Route = namedtuple('Route', 'destination gateway netmask interface metric flags')
def routes(): def routes():
"""Get a collection of the available routes.""" ''' A list of routes on this machine '''
ans = [] ans = []
adapter_map = {a.if_index:a.name for a in adapters()} adapter_map = {a.if_index:a.name for a in adapters()}
with _get_forward_table() as p_forward_table: with _get_forward_table() as p_forward_table: