# HG changeset patch # User souliane # Date 1460893060 -7200 # Node ID 16e65f15f31f886f02b9be94230b4ed403261b1e # Parent 44342730df661b338fe98a5c9f78ea29981f6fbe plugin adhoc_dbus, jp (cmd/adhoc): fixes adHocDBusAddAuto when no bus is found fix bug 134 diff -r 44342730df66 -r 16e65f15f31f frontends/src/jp/cmd_adhoc.py --- a/frontends/src/jp/cmd_adhoc.py Sun Apr 17 13:00:44 2016 +0200 +++ b/frontends/src/jp/cmd_adhoc.py Sun Apr 17 13:37:40 2016 +0200 @@ -48,6 +48,9 @@ bus_name, methods = self.host.bridge.adHocDBusAddAuto(name, jids, self.args.groups, magics, self.args.forbidden_jids, self.args.forbidden_groups, flags, self.profile) + if not bus_name: + self.disp(_("No bus name found"), 1) + return self.disp(_("Bus name found: [%s]" % bus_name), 1) for method in methods: path, iface, command = method diff -r 44342730df66 -r 16e65f15f31f src/plugins/plugin_adhoc_dbus.py --- a/src/plugins/plugin_adhoc_dbus.py Sun Apr 17 13:00:44 2016 +0200 +++ b/src/plugins/plugin_adhoc_dbus.py Sun Apr 17 13:37:40 2016 +0200 @@ -130,7 +130,7 @@ bus_names = [bus_name for bus_name in bus_names if '.' + prog_name in bus_name] if not bus_names: log.info("Can't find any bus for [%s]" % prog_name) - return + defer.returnValue(("", [])) bus_names.sort() for bus_name in bus_names: if bus_name.endswith(prog_name):