From 927be95b95d0d345cda23db1cddf3b500c557404 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 24 Aug 2016 16:00:46 -0400 Subject: [PATCH] util: default_route: Handle lack of /proc/net/route Which doesn't exist on freebsd for example https://bugzilla.redhat.com/show_bug.cgi?id=1369803 --- virtinst/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/virtinst/util.py b/virtinst/util.py index 57c81497f..823b2728e 100644 --- a/virtinst/util.py +++ b/virtinst/util.py @@ -201,6 +201,10 @@ def generate_uuid(conn): def default_route(): route_file = "/proc/net/route" + if not os.path.exists(route_file): + logging.debug("route_file=%s does not exist", route_file) + return None + d = file(route_file) defn = 0