mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[utils] Catch WebView exceptions and tell user how to disable it
This commit is contained in:
parent
674793b808
commit
55ec1707ef
|
@ -129,7 +129,13 @@ def do_webview_login(callback_sid=None, callback_code=None):
|
|||
url=login_url, width=768, height=1024, js_api=api)
|
||||
api.window = window
|
||||
window.loaded += api.on_loaded
|
||||
webview.start()
|
||||
|
||||
try:
|
||||
webview.start()
|
||||
except Exception as we:
|
||||
logger.error(f'Running webview failed with {we!r}. If this error persists try the manual '
|
||||
f'login process by adding --disable-webview to your command line.')
|
||||
return None
|
||||
|
||||
if api.callback_result is None:
|
||||
logger.error(f'Login aborted by user.')
|
||||
|
|
Loading…
Reference in a new issue