Skip to content

Commit

Permalink
Remove import urllib3 and let sentry_sdk import and patch it. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Jul 30, 2023
1 parent 535f537 commit b0e3e93
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions gns3/crash_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import sys
import os
import platform
import struct
import distro
import urllib3

try:
import sentry_sdk
from sentry_sdk.integrations.logging import LoggingIntegration
Expand All @@ -30,6 +23,12 @@
# Sentry SDK is not installed with deb package in order to simplify packaging
SENTRY_SDK_AVAILABLE = False

import sys
import os
import platform
import struct
import distro

from .utils.get_resource import get_resource
from .version import __version__, __version_info__

Expand Down Expand Up @@ -82,7 +81,7 @@ def __init__(self):
ca_certs=cacert,
default_integrations=False,
integrations=[sentry_logging])
except urllib3.exceptions.HTTPError as e:
except Exception as e:
log.error("Crash report could not be sent: {}".format(e))
return

Expand Down

0 comments on commit b0e3e93

Please sign in to comment.