1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-25 01:38:08 +00:00

Merge branch '2.2' into 3.0

# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/utils/images.py
This commit is contained in:
grossmj 2023-08-02 18:26:50 +10:00
commit 1d59afa9fb
3 changed files with 13 additions and 8 deletions

View File

@ -291,7 +291,7 @@ class Controller:
log.error(f"Cannot read Etag appliance file '{etag_appliances_path}': {e}") log.error(f"Cannot read Etag appliance file '{etag_appliances_path}': {e}")
# FIXME install builtin appliances only once, need to store "version" somewhere... # FIXME install builtin appliances only once, need to store "version" somewhere...
#if parse_version(__version__) > parse_version(controller_settings.get("version", "")): #if parse_version(__version__.split("+")[0]) > parse_version(controller_settings.get("version", "")):
# self._appliance_manager.install_builtin_appliances() # self._appliance_manager.install_builtin_appliances()
self._appliance_manager.install_builtin_appliances() self._appliance_manager.install_builtin_appliances()

View File

@ -83,6 +83,7 @@ class CrashReport:
# Don't send log records as events. # Don't send log records as events.
sentry_logging = LoggingIntegration(level=logging.INFO, event_level=None) sentry_logging = LoggingIntegration(level=logging.INFO, event_level=None)
try:
sentry_sdk.init( sentry_sdk.init(
dsn=CrashReport.DSN, dsn=CrashReport.DSN,
release=__version__, release=__version__,
@ -90,6 +91,9 @@ class CrashReport:
default_integrations=False, default_integrations=False,
integrations=[sentry_logging], integrations=[sentry_logging],
) )
except Exception as e:
log.error("Crash report could not be sent: {}".format(e))
return
tags = { tags = {
"os:name": platform.system(), "os:name": platform.system(),

View File

@ -247,6 +247,7 @@ def md5sum(path, working_dir=None, stopped_event=None, cache_to_md5file=True):
try: try:
m = hashlib.md5() m = hashlib.md5()
log.debug(f"Calculating MD5 sum of `{path}`")
with open(path, "rb") as f: with open(path, "rb") as f:
while True: while True:
if stopped_event is not None and stopped_event.is_set(): if stopped_event is not None and stopped_event.is_set():