Skip to content

Commit

Permalink
Fix path error
Browse files Browse the repository at this point in the history
  • Loading branch information
tdeni committed Nov 7, 2020
1 parent 2a5104d commit e7fef31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions myconfig/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ def parser(files: list) -> dict:
try:
if format == 'json':
for file in files:
with open(DIR.joinpath(file)) as f:
with open(str(DIR.joinpath(file))) as f:
try:
data.update(j_load(f))
except JSONDecodeError:
pass
elif format == 'toml':
for file in files:
with open(DIR.joinpath(file)) as f:
with open(str(DIR.joinpath(file))) as f:
data.update(t_laod(f))
elif format == 'yaml':
for file in files:
with open(DIR.joinpath(file)) as f:
with open(str(DIR.joinpath(file))) as f:
data.update(y_load(f))
else:
raise Exception('Unknown format.')
Expand Down

0 comments on commit e7fef31

Please sign in to comment.