Pylint Compliance
- Modifies codebase to match conventions set by Pylint. - Added update command to template.
This commit is contained in:
parent
f928c6df20
commit
58ca231454
5 changed files with 54 additions and 30 deletions
|
@ -7,6 +7,7 @@ import yaml
|
|||
|
||||
|
||||
def read_logging_config(default_path="logging.yaml", env_key="LOG_CFG"):
|
||||
"""Load the logging config into memory"""
|
||||
path = default_path
|
||||
value = os.getenv(env_key, None)
|
||||
if value:
|
||||
|
@ -15,11 +16,11 @@ def read_logging_config(default_path="logging.yaml", env_key="LOG_CFG"):
|
|||
with open(path, "rt") as f:
|
||||
logging_config = yaml.safe_load(f.read())
|
||||
return logging_config
|
||||
else:
|
||||
return None
|
||||
return None
|
||||
|
||||
|
||||
def setup_logging(logging_config, default_level=logging.INFO):
|
||||
"""Configure logging"""
|
||||
if logging_config:
|
||||
logging.config.dictConfig(logging_config)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue