Add NameError to exception in avahi_announce beacon

Fixes #38684

If you have dbus installed, but not avahi, you will get a NameError
in the dbus.Interface call. We need to catch this situation and not
stacktrace when the beacon gets loaded.
This commit is contained in:
rallytime 2017-01-12 11:56:49 -07:00
parent cfd82d1631
commit db60bed24c

View File

@ -32,7 +32,7 @@ try:
GROUP = dbus.Interface(BUS.get_object(avahi.DBUS_NAME, SERVER.EntryGroupNew()),
avahi.DBUS_INTERFACE_ENTRY_GROUP)
HAS_DBUS = True
except ImportError:
except (ImportError, NameError):
HAS_DBUS = False
except DBusException:
HAS_DBUS = False