diff --git a/net b/net index bc5139f..6b145d2 100755 --- a/net +++ b/net @@ -349,7 +349,7 @@ def get_routes(): route = {'target': target, 'netmask': netmask, } - for i in xrange(0, len(attrs), 2): + for i in xrange(0, len(attrs) & ~1, 2): route[attrs[i]] = attrs[i + 1] routes.append(route) return routes