MCPcopy Create free account
hub / github.com/chatmail/core / new_online_configuring_account

Method new_online_configuring_account

python/src/deltachat/testplugin.py:498–517  ·  view source on GitHub ↗
(self, cloned_from=None, cache=False, **kwargs)

Source from the content-addressed store, hash-verified

496 return ac
497
498 def new_online_configuring_account(self, cloned_from=None, cache=False, **kwargs) -> Account:
499 if cloned_from is None:
500 configdict = self.get_next_liveconfig()
501 else:
502 # XXX we might want to transfer the key to the new account
503 configdict = {
504 "addr": cloned_from.get_config("addr"),
505 "mail_pw": cloned_from.get_config("mail_pw"),
506 "imap_certificate_checks": cloned_from.get_config("imap_certificate_checks"),
507 }
508 configdict.update(kwargs)
509 ac = self._get_cached_account(addr=configdict["addr"]) if cache else None
510 if ac is not None:
511 # make sure we consume a preconfig key, as if we had created a fresh account
512 self._preconfigured_keys.pop(0)
513 self._acsetup.add_configured(ac)
514 return ac
515 ac = self.prepare_account_from_liveconfig(configdict)
516 self._acsetup.start_configure(ac)
517 return ac
518
519 def prepare_account_from_liveconfig(self, configdict) -> Account:
520 ac = self.get_unconfigured_account()

Calls 6

get_next_liveconfigMethod · 0.95
_get_cached_accountMethod · 0.95
add_configuredMethod · 0.80
start_configureMethod · 0.80
get_configMethod · 0.45

Tested by

no test coverage detected