Skip to content

Commit

Permalink
Use dict comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
Donnype committed Aug 29, 2024
1 parent 7875963 commit f8d1388
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions boefjes/boefjes/job_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ def get_environment_settings(boefje_meta: BoefjeMeta, schema: dict | None = None
raise

settings_from_katalogus = response.json()
new_env = {}

for key, value in os.environ.items():
if key.startswith("BOEFJE_"):
env_key = key.split("BOEFJE_", 1)[1]
new_env[env_key] = value
new_env = {key.split("BOEFJE_", 1)[1]: value for key, value in os.environ.items() if key.startswith("BOEFJE_")}

for key, value in settings_from_katalogus.items:
new_env[key] = value
Expand Down

0 comments on commit f8d1388

Please sign in to comment.