Hopefully fix/catch browser errors

This commit is contained in:
Shaun Eccles-Smith 2021-01-03 08:26:46 +11:00
parent b2a5ee7f39
commit 4c91af9a7b
2 changed files with 6 additions and 3 deletions

View File

@ -14,4 +14,7 @@ b55fa2f9d507c52c5afc2b5260b38c800b6b8ed4
cd60a2b3f67bc7c4adfe630b80e95600380167db
# isort, flake8, black 77b63bb Dec 18 2020
77b63bbfb189b5296dfa1118aea397f7c853f5c6
77b63bbfb189b5296dfa1118aea397f7c853f5c6
# Add integrations isort
b2a5ee7f3993fe1ece06639c174e5ee6cae02cb8

View File

@ -116,8 +116,8 @@ class LedFxCore(object):
# If the user has specified an adaptor, launch its address
url = self.http.base_url
try:
webbrowser.open(url)
except FileNotFoundError:
webbrowser.get().open(url)
except webbrowser.Error:
_LOGGER.warning(
f"Failed to open default web browser. To access LedFx's web ui, open {url} in your browser. To prevent this error in future, configure a default browser for your system."
)