diff src/plugins/plugin_adhoc_dbus.py @ 916:1a759096ccbd

core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
author Goffi <goffi@goffi.org>
date Fri, 21 Mar 2014 16:27:09 +0100
parents 30ed86ea1c82
children 301b342c697a
line wrap: on
line diff
--- a/src/plugins/plugin_adhoc_dbus.py	Fri Mar 21 16:19:46 2014 +0100
+++ b/src/plugins/plugin_adhoc_dbus.py	Fri Mar 21 16:27:09 2014 +0100
@@ -18,6 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from sat.core.i18n import _, D_
+from sat.core.constants import Const as C
 from logging import debug, info, warning, error
 from twisted.words.protocols.jabber import jid
 from twisted.internet import defer, reactor
@@ -120,7 +121,7 @@
         return self.adHocDBusAddAuto(prog_name, allowed_jids, allowed_groups, allowed_magics, forbidden_jids, forbidden_groups, flags, profile_key)
 
     @defer.inlineCallbacks
-    def adHocDBusAddAuto(self, prog_name, allowed_jids=None, allowed_groups=None, allowed_magics=None, forbidden_jids=None, forbidden_groups=None, flags=None, profile_key='@NONE@'):
+    def adHocDBusAddAuto(self, prog_name, allowed_jids=None, allowed_groups=None, allowed_magics=None, forbidden_jids=None, forbidden_groups=None, flags=None, profile_key=C.PROF_KEY_NONE):
         bus_names = yield self._DBusListNames()
         bus_names = [bus_name for bus_name in bus_names if '.' + prog_name in bus_name]
         if not bus_names:
@@ -149,7 +150,7 @@
         defer.returnValue((bus_name, methods))
 
 
-    def _addCommand(self, adhoc_name, bus_name, methods, allowed_jids=None, allowed_groups=None, allowed_magics=None, forbidden_jids=None, forbidden_groups=None, flags=None, profile_key='@NONE@'):
+    def _addCommand(self, adhoc_name, bus_name, methods, allowed_jids=None, allowed_groups=None, allowed_magics=None, forbidden_jids=None, forbidden_groups=None, flags=None, profile_key=C.PROF_KEY_NONE):
         if flags is None:
             flags = set()