mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
fix depreciated import from collections
This commit is contained in:
parent
d995761419
commit
c6234bf548
@ -1,4 +1,3 @@
|
|||||||
import collections
|
|
||||||
import copy
|
import copy
|
||||||
import datetime
|
import datetime
|
||||||
import hashlib
|
import hashlib
|
||||||
@ -11,6 +10,7 @@ import threading
|
|||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
from collections.abc import Mapping
|
||||||
from multiprocessing import shared_memory
|
from multiprocessing import shared_memory
|
||||||
from typing import AnyStr
|
from typing import AnyStr
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ def deep_merge(dct1: dict, dct2: dict, override=False, merge_lists=False) -> dic
|
|||||||
for k, v2 in dct2.items():
|
for k, v2 in dct2.items():
|
||||||
if k in merged:
|
if k in merged:
|
||||||
v1 = merged[k]
|
v1 = merged[k]
|
||||||
if isinstance(v1, dict) and isinstance(v2, collections.Mapping):
|
if isinstance(v1, dict) and isinstance(v2, Mapping):
|
||||||
merged[k] = deep_merge(v1, v2, override)
|
merged[k] = deep_merge(v1, v2, override)
|
||||||
elif isinstance(v1, list) and isinstance(v2, list):
|
elif isinstance(v1, list) and isinstance(v2, list):
|
||||||
if merge_lists:
|
if merge_lists:
|
||||||
|
Loading…
Reference in New Issue
Block a user