From d7ff94d826c70a4655f671e2d45a98635d6dce67 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 9 Jan 2016 21:25:53 +0530 Subject: [PATCH] ... --- src/calibre/utils/ip_routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/utils/ip_routing.py b/src/calibre/utils/ip_routing.py index 29534d6a01..9c66f79e4a 100644 --- a/src/calibre/utils/ip_routing.py +++ b/src/calibre/utils/ip_routing.py @@ -62,7 +62,7 @@ else: raw = open('/proc/net/route', 'rb').read().decode('utf-8') for line in raw.splitlines(): parts = line.split() - if parts[1] == '00000000': + if len(parts) > 1 and parts[1] == '00000000': for addr in get_addresses_for_interface(parts[0]): return addr