mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Edited the dict_config() docstring
This commit is contained in:
parent
29f3327271
commit
d0770da51d
@ -159,16 +159,20 @@ def update_types(config, reference, list_sep=':'):
|
|||||||
|
|
||||||
|
|
||||||
def dict_config(config):
|
def dict_config(config):
|
||||||
"""Merge the provided configuration with the default one.
|
"""Set bigchaindb.config equal to the default config dict,
|
||||||
|
then update that with whatever is in the provided config dict,
|
||||||
|
and then set bigchaindb.config['CONFIGURED'] = True
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
newconfig (dict): a dictionary with the configuration to load.
|
config (dict): the config dict to read for changes
|
||||||
|
to the default config
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
The function merges ``newconfig`` with the **default configuration**, so any
|
Any previous changes made to ``bigchaindb.config`` will be lost.
|
||||||
update made to ``bigchaindb.config`` will be lost.
|
|
||||||
"""
|
"""
|
||||||
|
# Deep copy the default config into bigchaindb.config
|
||||||
bigchaindb.config = copy.deepcopy(bigchaindb._config)
|
bigchaindb.config = copy.deepcopy(bigchaindb._config)
|
||||||
|
# Update the default config with whatever is in the passed config
|
||||||
update(bigchaindb.config, update_types(config, bigchaindb.config))
|
update(bigchaindb.config, update_types(config, bigchaindb.config))
|
||||||
bigchaindb.config['CONFIGURED'] = True
|
bigchaindb.config['CONFIGURED'] = True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user