diff frontends/src/jp/cmd_param.py @ 1864:96ba685162f6

jp: all commands now use the new start method and set need_loop in __init__ when needed
author Goffi <goffi@goffi.org>
date Mon, 29 Feb 2016 16:52:51 +0100
parents d17772b0fe22
children 3e168cde7a7d
line wrap: on
line diff
--- a/frontends/src/jp/cmd_param.py	Mon Feb 29 16:52:51 2016 +0100
+++ b/frontends/src/jp/cmd_param.py	Mon Feb 29 16:52:51 2016 +0100
@@ -34,8 +34,7 @@
         self.parser.add_argument("-a", "--attribute", type=str, default="value", help=_(u"Name of the attribute to get"))
         self.parser.add_argument("--security-limit", type=int, default=-1, help=_(u"Security limit"))
 
-    def connected(self):
-        super(Get, self).connected()
+    def start(self):
         if self.args.category is None:
             categories = self.host.bridge.getParamsCategories()
             print u"\n".join(categories)
@@ -67,8 +66,7 @@
         self.parser.add_argument("value", type=base.unicode_decoder, help=_(u"Name of the parameter"))
         self.parser.add_argument("--security-limit", type=int, default=-1, help=_(u"Security limit"))
 
-    def connected(self):
-        super(Set, self).connected()
+    def start(self):
         try:
             self.host.bridge.setParam(self.args.name, self.args.value, self.args.category, self.args.security_limit, self.profile)
         except Exception as e:
@@ -82,7 +80,7 @@
     def add_parser_options(self):
         self.parser.add_argument("filename", type=str, help=_("Output file"))
 
-    def run(self):
+    def start(self):
         """Save parameters template to xml file"""
         if self.host.bridge.saveParamsTemplate(self.args.filename):
             print _("Parameters saved to file %s") % self.args.filename
@@ -98,7 +96,7 @@
     def add_parser_options(self):
         self.parser.add_argument("filename", type=str, help=_("Input file"))
 
-    def run(self):
+    def start(self):
         """Load parameters template from xml file"""
         if self.host.bridge.loadParamsTemplate(self.args.filename):
             print _("Parameters loaded from file %s") % self.args.filename