Mercurial > libervia-backend
comparison sat_frontends/quick_frontend/quick_app.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 | eb69ec549d05 |
children | 003b8b4b56a7 |
comparison
equal
deleted
inserted
replaced
2764:92af49cde255 | 2765:378188abe941 |
---|---|
121 | 121 |
122 def _plug_profile_autoconnect(self, value_str): | 122 def _plug_profile_autoconnect(self, value_str): |
123 autoconnect = C.bool(value_str) | 123 autoconnect = C.bool(value_str) |
124 if autoconnect and not self.connected: | 124 if autoconnect and not self.connected: |
125 self.host.connect( | 125 self.host.connect( |
126 self.profile, callback=lambda dummy: self._plug_profile_afterconnect() | 126 self.profile, callback=lambda __: self._plug_profile_afterconnect() |
127 ) | 127 ) |
128 else: | 128 else: |
129 self._plug_profile_afterconnect() | 129 self._plug_profile_afterconnect() |
130 | 130 |
131 def _plug_profile_afterconnect(self): | 131 def _plug_profile_afterconnect(self): |
555 if not self._plugs_in_progress: | 555 if not self._plugs_in_progress: |
556 self.contact_lists.lockUpdate(False) | 556 self.contact_lists.lockUpdate(False) |
557 | 557 |
558 def connect(self, profile, callback=None, errback=None): | 558 def connect(self, profile, callback=None, errback=None): |
559 if not callback: | 559 if not callback: |
560 callback = lambda dummy: None | 560 callback = lambda __: None |
561 if not errback: | 561 if not errback: |
562 | 562 |
563 def errback(failure): | 563 def errback(failure): |
564 log.error(_(u"Can't connect profile [%s]") % failure) | 564 log.error(_(u"Can't connect profile [%s]") % failure) |
565 try: | 565 try: |
725 subject = {} | 725 subject = {} |
726 if extra is None: | 726 if extra is None: |
727 extra = {} | 727 extra = {} |
728 if callback is None: | 728 if callback is None: |
729 callback = ( | 729 callback = ( |
730 lambda dummy=None: None | 730 lambda __=None: None |
731 ) # FIXME: optional argument is here because pyjamas doesn't support callback | 731 ) # FIXME: optional argument is here because pyjamas doesn't support callback |
732 # without arg with json proxy | 732 # without arg with json proxy |
733 if errback is None: | 733 if errback is None: |
734 errback = lambda failure: self.showDialog( | 734 errback = lambda failure: self.showDialog( |
735 failure.fullname, failure.message, "error" | 735 failure.fullname, failure.message, "error" |