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
This commit is contained in:
Cole Robinson 2016-08-24 16:00:46 -04:00
parent eb2a56f700
commit 927be95b95

View File

@ -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