mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
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:
parent
eb2a56f700
commit
927be95b95
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user