Skip to content

Commit

Permalink
Use dbus only if it is present (ansible#19060)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fale authored and gundalow committed Dec 9, 2016
1 parent 3b509b1 commit 28a12e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/modules/network/nmcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,8 @@ class Nmcli(object):

platform='Generic'
distribution=None
bus=dbus.SystemBus()
if HAVE_DBUS:
bus=dbus.SystemBus()
# The following is going to be used in dbus code
DEVTYPES={1: "Ethernet",
2: "Wi-Fi",
Expand Down

0 comments on commit 28a12e8

Please sign in to comment.