diff --git a/python/src/deltachat/account.py b/python/src/deltachat/account.py index 75e5f414b..6fb32b73e 100644 --- a/python/src/deltachat/account.py +++ b/python/src/deltachat/account.py @@ -328,10 +328,10 @@ class Account(object): self.configure() self._threads.start() - def stop_threads(self): + def stop_threads(self, wait=True): """ stop IMAP/SMTP threads. """ lib.dc_stop_ongoing_process(self._dc_context) - self._threads.stop(wait=True) + self._threads.stop(wait=wait) def _process_event(self, ctx, evt_name, data1, data2): assert ctx == self._dc_context diff --git a/python/tests/conftest.py b/python/tests/conftest.py index d005fc408..64668d938 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -103,7 +103,7 @@ def acfactory(pytestconfig, tmpdir, request): ac._evlogger.set_timeout(30) ac.configure(**configdict) ac.start_threads() - self._finalizers.append(ac.stop_threads) + self._finalizers.append(lambda: ac.stop_threads(wait=False)) return ac def clone_online_account(self, account): @@ -114,7 +114,7 @@ def acfactory(pytestconfig, tmpdir, request): ac._evlogger.set_timeout(30) ac.configure(addr=account.get_config("addr"), mail_pw=account.get_config("mail_pw")) ac.start_threads() - self._finalizers.append(ac.stop_threads) + self._finalizers.append(lambda: ac.stop_threads(wait=False)) return ac return AccountMaker() diff --git a/src/key.rs b/src/key.rs index 0bcb21436..0b1fc7895 100644 --- a/src/key.rs +++ b/src/key.rs @@ -90,7 +90,6 @@ impl Key { } pub fn from_slice(bytes: &[u8], key_type: KeyType) -> Option { - println!("hello from_slice"); let res: Result = match key_type { KeyType::Public => SignedPublicKey::from_bytes(Cursor::new(bytes)).map(Into::into), KeyType::Private => SignedSecretKey::from_bytes(Cursor::new(bytes)).map(Into::into),