Compare commits

...

3 commits

3 changed files with 21 additions and 8 deletions

12
.editorconfig Normal file
View file

@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*.py]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View file

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2

View file

@ -30,13 +30,14 @@ class Config:
logging.debug('Parsing config')
parsed = {}
try:
with open(configfile, 'r') as file:
parsed = yaml.safe_load(file.read())
except FileNotFoundError as error:
logging.warning('No config file found (%s)', error.filename)
except TypeError:
logging.warning('No config file provided.')
if configfile is not None:
try:
with open(configfile, 'r') as file:
parsed = yaml.safe_load(file.read())
except FileNotFoundError as error:
logging.warning('No config file found (%s)', error.filename)
except TypeError:
logging.warning('No config file provided.')
# Iterate over the config defaults and check for environment variable
# overrides, then check for any items in the config, otherwise