diff frontends/src/jp/cmd_pubsub.py @ 2195:d65275ac39b3

plugin XEP-0060: renamed psGet bridge method to psItemGet
author Goffi <goffi@goffi.org>
date Mon, 13 Mar 2017 23:17:13 +0100
parents a1a8233f89e8
children e0e06391ce91
line wrap: on
line diff
--- a/frontends/src/jp/cmd_pubsub.py	Mon Mar 13 23:15:06 2017 +0100
+++ b/frontends/src/jp/cmd_pubsub.py	Mon Mar 13 23:17:13 2017 +0100
@@ -28,7 +28,7 @@
 class Get(base.CommandBase):
 
     def __init__(self, host):
-        base.CommandBase.__init__(self, host, 'get', use_verbose=True, use_output=C.OUTPUT_LIST_XML, help=_(u'get pubsub item(s)'))
+        base.CommandBase.__init__(self, host, 'get', use_output=C.OUTPUT_LIST_XML, help=_(u'get pubsub item(s)'))
         self.need_loop=True
 
     def add_parser_options(self):
@@ -44,17 +44,17 @@
         # TODO: add MAM filters
 
 
-    def psGetCb(self, ps_result):
+    def psItemGetCb(self, ps_result):
         self.output(ps_result[0])
         self.host.quit(C.EXIT_OK)
 
-    def psGetEb(self, failure_):
+    def psItemGetEb(self, failure_):
         self.disp(u"can't get pubsub items: {reason}".format(
             reason=failure_), error=True)
         self.host.quit(C.EXIT_BRIDGE_ERRBACK)
 
     def start(self):
-        self.host.bridge.psGet(
+        self.host.bridge.psItemGet(
             self.args.service,
             self.args.node,
             self.args.max,
@@ -62,8 +62,8 @@
             self.args.sub_id,
             {},
             self.profile,
-            callback=self.psGetCb,
-            errback=self.psGetEb)
+            callback=self.psItemGetCb,
+            errback=self.psItemGetEb)
 
 
 class Pubsub(base.CommandBase):