comparison cagou/core/cagou_main.py @ 284:ca4daced4638

misc: replaced "dummy" by "__"
author Goffi <goffi@goffi.org>
date Mon, 25 Mar 2019 07:11:09 +0100
parents 1b835bcfa663
children 3f7e227aab00
comparison
equal deleted inserted replaced
283:c73a7cd36b54 284:ca4daced4638
200 200
201 def addNotifWidget(self, widget): 201 def addNotifWidget(self, widget):
202 app = App.get_running_app() 202 app = App.get_running_app()
203 self.notifs_icon.addNotif(app.host.showExtraUI, widget=widget) 203 self.notifs_icon.addNotif(app.host.showExtraUI, widget=widget)
204 204
205 def _displayNextNote(self, dummy=None): 205 def _displayNextNote(self, __=None):
206 screen = Screen() 206 screen = Screen()
207 try: 207 try:
208 idx = self.notes.index(self.notes_last) + 1 208 idx = self.notes.index(self.notes_last) + 1
209 except ValueError: 209 except ValueError:
210 idx = 0 210 idx = 0
471 self.retried = 1 471 self.retried = 1
472 from twisted.internet.error import ConnectionRefusedError 472 from twisted.internet.error import ConnectionRefusedError
473 if failure.check(ConnectionRefusedError) and self.retried < 100: 473 if failure.check(ConnectionRefusedError) and self.retried < 100:
474 if self.retried % 20 == 0: 474 if self.retried % 20 == 0:
475 log.debug("backend not ready, retrying ({})".format(self.retried)) 475 log.debug("backend not ready, retrying ({})".format(self.retried))
476 Clock.schedule_once(lambda dummy: self.connectBridge(), 0.05) 476 Clock.schedule_once(lambda __: self.connectBridge(), 0.05)
477 return 477 return
478 super(Cagou, self)._bridgeEb(failure) 478 super(Cagou, self)._bridgeEb(failure)
479 479
480 def run(self): 480 def run(self):
481 self.connectBridge() 481 self.connectBridge()
497 self.app.showWidget() 497 self.app.showWidget()
498 self.bridge.getVersion(callback=self._getVersionCb) 498 self.bridge.getVersion(callback=self._getVersionCb)
499 self.app.initFrontendState() 499 self.app.initFrontendState()
500 self.postInit() 500 self.postInit()
501 501
502 def postInit(self, dummy=None): 502 def postInit(self, __=None):
503 # FIXME: resize doesn't work with SDL2 on android, so we use below_target for now 503 # FIXME: resize doesn't work with SDL2 on android, so we use below_target for now
504 self.app.root_window.softinput_mode = "below_target" 504 self.app.root_window.softinput_mode = "below_target"
505 profile_manager = self.app._profile_manager 505 profile_manager = self.app._profile_manager
506 del self.app._profile_manager 506 del self.app._profile_manager
507 super(Cagou, self).postInit(profile_manager) 507 super(Cagou, self).postInit(profile_manager)