mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-18 06:18:08 +00:00
Catch urllib3 exceptions when sending crash report. Ref https://github.com/GNS3/gns3-gui/issues/3483
This commit is contained in:
parent
c5c4e1ad56
commit
c226b2a9ef
@ -29,6 +29,7 @@ import struct
|
||||
import platform
|
||||
import locale
|
||||
import distro
|
||||
import urllib3
|
||||
|
||||
from .version import __version__, __version_info__
|
||||
from .config import Config
|
||||
@ -82,11 +83,15 @@ class CrashReport:
|
||||
# Don't send log records as events.
|
||||
sentry_logging = LoggingIntegration(level=logging.INFO, event_level=None)
|
||||
|
||||
try:
|
||||
sentry_sdk.init(dsn=CrashReport.DSN,
|
||||
release=__version__,
|
||||
ca_certs=cacert,
|
||||
default_integrations=False,
|
||||
integrations=[sentry_logging])
|
||||
except urllib3.exceptions.HTTPError as e:
|
||||
log.error("Crash report could not be sent: {}".format(e))
|
||||
return
|
||||
|
||||
tags = {
|
||||
"os:name": platform.system(),
|
||||
|
Loading…
Reference in New Issue
Block a user