Use dbus only if it is present (#19060)
This commit is contained in:
parent
3b509b1095
commit
28a12e8b27
1 changed files with 2 additions and 1 deletions
|
@ -524,7 +524,8 @@ class Nmcli(object):
|
||||||
|
|
||||||
platform='Generic'
|
platform='Generic'
|
||||||
distribution=None
|
distribution=None
|
||||||
bus=dbus.SystemBus()
|
if HAVE_DBUS:
|
||||||
|
bus=dbus.SystemBus()
|
||||||
# The following is going to be used in dbus code
|
# The following is going to be used in dbus code
|
||||||
DEVTYPES={1: "Ethernet",
|
DEVTYPES={1: "Ethernet",
|
||||||
2: "Wi-Fi",
|
2: "Wi-Fi",
|
||||||
|
|
Loading…
Reference in a new issue