mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-03-03 06:03:52 +08:00
version: dragonpilot v0.8.16 beta for EON/C2 date: 2022-08-11T09:38:43 dp-dev(priv2) master commit: c6cd233f23f60e7a6055d42850bc593c0e69082e
10 lines
259 B
Python
10 lines
259 B
Python
# remove all keys that end in DEPRECATED
|
|
def strip_deprecated_keys(d):
|
|
for k in list(d.keys()):
|
|
if isinstance(k, str):
|
|
if k.endswith('DEPRECATED'):
|
|
d.pop(k)
|
|
elif isinstance(d[k], dict):
|
|
strip_deprecated_keys(d[k])
|
|
return d
|