Use dbus only if it is present (#19060)

This commit is contained in:
Fabio Alessandro Locati 2016-12-09 22:35:55 +00:00 committed by John R Barker
parent 3b509b1095
commit 28a12e8b27

View file

@ -524,6 +524,7 @@ class Nmcli(object):
platform='Generic'
distribution=None
if HAVE_DBUS:
bus=dbus.SystemBus()
# The following is going to be used in dbus code
DEVTYPES={1: "Ethernet",