-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #791 from scap3yvt/790-add-an-option-for-backwards…
…-compatibility-for-parseconfig Added an option for backwards compatibility for parseconfig
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from .config_manager import ConfigManager | ||
|
||
|
||
def parseConfig(config_file_path, version_check_flag=True) -> None: | ||
""" | ||
This function parses the configuration file and returns a dictionary of parameters. | ||
Args: | ||
config_file_path (Union[str, dict]): The filename of the configuration file. | ||
version_check_flag (bool, optional): Whether to check the version in configuration file. Defaults to True. | ||
Returns: | ||
dict: The parameter dictionary. | ||
""" | ||
print( | ||
"WARNING: `GANDLF.parseConfig` will be deprecated in favor of `GANDLF.config_manager` in a future version." | ||
) | ||
return ConfigManager(config_file_path, version_check_flag) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters