Skip to content

Commit

Permalink
#4458 handle yet another NM API error
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 7, 2025
1 parent 2a1854e commit ad855ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xpra/net/device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ def get_NM_adapter_type(device_name, ignore_inactive=True) -> str:
except (ImportError, ValueError):
log("get_NM_adapter_type() no network-manager bindings")
return ""
nmclient = NM.Client.new(None)
try:
nmclient = NM.Client.new(None)
except Exception as e:
log("NM.Client.new(None)", exc_info=True)
log.warn("Warning: failed to query network manager")
log.warn(" %s", e)
return ""
if device_name:
nmdevice = nmclient.get_device_by_iface(device_name)
else:
Expand Down

0 comments on commit ad855ba

Please sign in to comment.