Skip to content

Commit

Permalink
Create sections if they do not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
kannibalox committed Mar 18, 2023
1 parent eefa97c commit 434fb52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ptpapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@

for key, section in env_keys.items():
if os.getenv(env_prefix + key) is not None:
if section[0] not in config.sections():
config.add_section(section[0])
config.set(section[0], section[1], os.getenv(env_prefix + key))

0 comments on commit 434fb52

Please sign in to comment.