blob: 6eecf92dc050295551a430a37303ab1ed337ac1d [file] [log] [blame]
Alex3bc95f62020-03-05 17:00:04 -06001from cfg_checker.common.log import logger, logger_cli
Alex Savatieiev5118de02019-02-20 15:50:42 -06002
Alex3bc95f62020-03-05 17:00:04 -06003from cfg_checker.common.other import Utils
Alex Savatieiev5118de02019-02-20 15:50:42 -06004
5
Alex74dc1352019-05-17 13:18:24 -05006def nested_set(_d, _keys, _value):
7 # # import and deepcopy for safety
8 # from copy import deepcopy
9 # _d = deepcopy(_dict)
10 # process
11 for k in _keys[:-1]:
12 _d = _d.setdefault(k, {})
13 _d[_keys[-1]] = _value
14
15
Alex Savatieiev5118de02019-02-20 15:50:42 -060016utils = Utils()
Alex Savatieiev5118de02019-02-20 15:50:42 -060017logger = logger
18logger_cli = logger_cli