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

Method _preconfigure_key

python/src/deltachat/testplugin.py:468–479  ·  view source on GitHub ↗
(self, account)

Source from the content-addressed store, hash-verified

466 self._preconfigured_keys = []
467
468 def _preconfigure_key(self, account):
469 # Only set a preconfigured key if we haven't used it yet for another account.
470 try:
471 keyname = self._preconfigured_keys.pop(0)
472 except IndexError:
473 pass
474 else:
475 fname_sec = self.data.read_path(f"key/{keyname}-secret.asc")
476 if fname_sec:
477 account._preconfigure_keypair(fname_sec)
478 return True
479 print("WARN: could not use preconfigured keys")
480
481 def get_pseudo_configured_account(self, passphrase: Optional[str] = None) -> Account:
482 # do a pseudo-configured account

Calls 2

_preconfigure_keypairMethod · 0.80
read_pathMethod · 0.45

Tested by

no test coverage detected