mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
python-bindings: set timeout for account configure
I need this for a script - it's not very important, it would just be nice to set a timeout if the account isn't configurable.
This commit is contained in:
@@ -90,11 +90,11 @@ class ConfigureTracker:
|
|||||||
if data1 is None or evdata == data1:
|
if data1 is None or evdata == data1:
|
||||||
break
|
break
|
||||||
|
|
||||||
def wait_finish(self):
|
def wait_finish(self, timeout=None):
|
||||||
""" wait until configure is completed.
|
""" wait until configure is completed.
|
||||||
|
|
||||||
Raise Exception if Configure failed
|
Raise Exception if Configure failed
|
||||||
"""
|
"""
|
||||||
if not self._configure_events.get():
|
if not self._configure_events.get(timeout=timeout):
|
||||||
content = "\n".join(map(str, self._ffi_events))
|
content = "\n".join(map(str, self._ffi_events))
|
||||||
raise ConfigureFailed(content)
|
raise ConfigureFailed(content)
|
||||||
|
|||||||
Reference in New Issue
Block a user