File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 2222
2323import configparser
2424import logging
25+ from threading import Lock
2526
2627from sirmordred ._version import __version__
2728
4142class Config ():
4243 """Class aimed to manage sirmordred configuration"""
4344
45+ config_lock = Lock ()
46+
4447 def __init__ (self , conf_file , conf_list = []):
4548 """Initialize object.
4649
@@ -654,8 +657,11 @@ def create_config_file(cls, file_path):
654657 parser .write (f )
655658
656659 def get_conf (self ):
657- # TODO: Return a deepcopy to avoid uncontrolled changes in config?
658- return self .conf
660+ """Reload configuration files"""
661+
662+ with self .config_lock :
663+ self .__read_conf_files ()
664+ return self .conf
659665
660666 def set_param (self , section , param , value ):
661667 """ Change a param in the config """
You can’t perform that action at this time.
0 commit comments