comparison frontends/src/jp/base.py @ 2142:be96beb7ca14

core, bridge, frontends: renamed asyncConnect to connect, and added options parameters (not used yet)
author Goffi <goffi@goffi.org>
date Mon, 06 Feb 2017 22:54:43 +0100
parents 469702b46768
children fff88c33442f
comparison
equal deleted inserted replaced
2141:35762e9ce8b9 2142:be96beb7ca14
480 480
481 if not hasattr(self.args, 'connect'): 481 if not hasattr(self.args, 'connect'):
482 # a profile can be present without connect option (e.g. on profile creation/deletion) 482 # a profile can be present without connect option (e.g. on profile creation/deletion)
483 return 483 return
484 elif self.args.connect is True: # if connection is asked, we connect the profile 484 elif self.args.connect is True: # if connection is asked, we connect the profile
485 self.bridge.asyncConnect(self.profile, self.args.pwd, lambda dummy: callback(), cant_connect) 485 self.bridge.connect(self.profile, self.args.pwd, {}, lambda dummy: callback(), cant_connect)
486 self._auto_loop = True 486 self._auto_loop = True
487 return 487 return
488 else: 488 else:
489 if not self.bridge.isConnected(self.profile): 489 if not self.bridge.isConnected(self.profile):
490 log.error(_(u"Profile [{profile}] is not connected, please connect it before using jp, or use --connect option").format(profile=self.profile)) 490 log.error(_(u"Profile [{profile}] is not connected, please connect it before using jp, or use --connect option").format(profile=self.profile))