comparison sat_frontends/jp/base.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 92af49cde255
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2764:92af49cde255 2765:378188abe941
721 start_session = self.args.start_session 721 start_session = self.args.start_session
722 except AttributeError: 722 except AttributeError:
723 pass 723 pass
724 else: 724 else:
725 if start_session: 725 if start_session:
726 self.bridge.profileStartSession(self.args.pwd, self.profile, lambda dummy: callback(), cant_start_session) 726 self.bridge.profileStartSession(self.args.pwd, self.profile, lambda __: callback(), cant_start_session)
727 self._auto_loop = True 727 self._auto_loop = True
728 return 728 return
729 elif not self.bridge.profileIsSessionStarted(self.profile): 729 elif not self.bridge.profileIsSessionStarted(self.profile):
730 if not self.args.connect: 730 if not self.args.connect:
731 log.error(_(u"Session for [{profile}] is not started, please start it before using jp, or use either --start-session or --connect option").format(profile=self.profile)) 731 log.error(_(u"Session for [{profile}] is not started, please start it before using jp, or use either --start-session or --connect option").format(profile=self.profile))
737 737
738 if not hasattr(self.args, 'connect'): 738 if not hasattr(self.args, 'connect'):
739 # a profile can be present without connect option (e.g. on profile creation/deletion) 739 # a profile can be present without connect option (e.g. on profile creation/deletion)
740 return 740 return
741 elif self.args.connect is True: # if connection is asked, we connect the profile 741 elif self.args.connect is True: # if connection is asked, we connect the profile
742 self.bridge.connect(self.profile, self.args.pwd, {}, lambda dummy: callback(), cant_connect) 742 self.bridge.connect(self.profile, self.args.pwd, {}, lambda __: callback(), cant_connect)
743 self._auto_loop = True 743 self._auto_loop = True
744 return 744 return
745 else: 745 else:
746 if not self.bridge.isConnected(self.profile): 746 if not self.bridge.isConnected(self.profile):
747 log.error(_(u"Profile [{profile}] is not connected, please connect it before using jp, or use --connect option").format(profile=self.profile)) 747 log.error(_(u"Profile [{profile}] is not connected, please connect it before using jp, or use --connect option").format(profile=self.profile))