comparison sat_frontends/jp/cmd_profile.py @ 2765:378188abe941

misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext)
author Goffi <goffi@goffi.org>
date Fri, 11 Jan 2019 11:13:15 +0100
parents 26edcf3a30eb
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2764:92af49cde255 2765:378188abe941
85 res = raw_input("{} (y/N)? ".format(message)) 85 res = raw_input("{} (y/N)? ".format(message))
86 if res not in ("y", "Y"): 86 if res not in ("y", "Y"):
87 self.disp(_(u"Profile deletion cancelled")) 87 self.disp(_(u"Profile deletion cancelled"))
88 self.host.quit(2) 88 self.host.quit(2)
89 89
90 self.host.bridge.asyncDeleteProfile(self.args.profile, callback=lambda dummy: None) 90 self.host.bridge.asyncDeleteProfile(self.args.profile, callback=lambda __: None)
91 91
92 92
93 class ProfileInfo(base.CommandBase): 93 class ProfileInfo(base.CommandBase):
94 def __init__(self, host): 94 def __init__(self, host):
95 super(ProfileInfo, self).__init__(host, 'info', need_connect=False, help=_(u'get information about a profile')) 95 super(ProfileInfo, self).__init__(host, 'info', need_connect=False, help=_(u'get information about a profile'))
151 self.parser.add_argument('-x', '--xmpp-password', type=str, help=_(u'the password of the XMPP account (use profile password if not specified)'), 151 self.parser.add_argument('-x', '--xmpp-password', type=str, help=_(u'the password of the XMPP account (use profile password if not specified)'),
152 metavar='PASSWORD') 152 metavar='PASSWORD')
153 self.parser.add_argument('-C', '--component', type=base.unicode_decoder, default='', 153 self.parser.add_argument('-C', '--component', type=base.unicode_decoder, default='',
154 help=_(u'set to component import name (entry point) if this is a component')) 154 help=_(u'set to component import name (entry point) if this is a component'))
155 155
156 def _session_started(self, dummy): 156 def _session_started(self, __):
157 if self.args.jid: 157 if self.args.jid:
158 self.host.bridge.setParam("JabberID", self.args.jid, "Connection", profile_key=self.args.profile) 158 self.host.bridge.setParam("JabberID", self.args.jid, "Connection", profile_key=self.args.profile)
159 xmpp_pwd = self.args.password or self.args.xmpp_password 159 xmpp_pwd = self.args.password or self.args.xmpp_password
160 if xmpp_pwd: 160 if xmpp_pwd:
161 self.host.bridge.setParam("Password", xmpp_pwd, "Connection", profile_key=self.args.profile) 161 self.host.bridge.setParam("Password", xmpp_pwd, "Connection", profile_key=self.args.profile)