Commit abadfdc9 authored by André Anjos's avatar André Anjos 💬

[config] Centralize config reading

parent 8cc3e195
Pipeline #45645 passed with stage
in 8 minutes and 57 seconds
#!/usr/bin/env python
# coding=utf-8
"""Reads and treats configuration files"""
import os
import configparser
def read_config():
"""Reads and resolves configuration files, returns a dictionary with read
values"""
data = configparser.ConfigParser()
cfg = os.path.expanduser("~/.bdtrc")
if os.path.exists(cfg):
data.read(cfg)
return data
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment