Merge branch 'staging/maintenance' into maintenance

This commit is contained in:
Gina Häußge committed 2022-04-05 14:50:02 +02:00
commit a0128a3a39
5 files changed
+27 -6

No files matched your search

@@ -18,10 +18,10 @@ from octoprint.util.version import (
)
SENTRY_URL_SERVER = (
"https://4f9abc3158334309ad3c22f6693ee6e7@o118517.ingest.sentry.io/1373987"
"https://b39cd0dcaea5404798ec3eb193b291db@o118517.ingest.sentry.io/1373987"
)
SENTRY_URL_COREUI = (
"https://ef731a61e7a146228b720c54e21c554c@o118517.ingest.sentry.io/1374096"
"https://ab48b21452fe424eaf79468aa6c94bd7@o118517.ingest.sentry.io/1374096"
)
SETTINGS_DEFAULTS = {
+16 -2
View File
@@ -577,16 +577,30 @@ class HierarchicalChainMap:
if d is None:
return {}
result = dict()
result = {}
for key, value in d.items():
if not key.startswith(prefix):
continue
subkeys = key[len(prefix) :].split(_CHAINMAP_SEP)
current = result
path = []
for subkey in subkeys[:-1]:
if subkey not in current or current[subkey] is None:
# we only need that for logging in case of data weirdness below
path.append(subkey)
# make sure the subkey is in the current dict, and that it is a dict
if subkey not in current:
current[subkey] = {}
elif not isinstance(current[subkey], dict):
logging.getLogger(__name__).warning(
f"There is a non-dict value on the path to {key} at {path!r}, ignoring."
)
current[subkey] = {}
# go down a level
current = current[subkey]
current[subkeys[-1]] = value
return result