Skip to content

Add handling for an empty env arg when using the run method.#5

Closed
hello-world-bfree wants to merge 1 commit into
slingdata-io:mainfrom
hello-world-bfree:main
Closed

Add handling for an empty env arg when using the run method.#5
hello-world-bfree wants to merge 1 commit into
slingdata-io:mainfrom
hello-world-bfree:main

Conversation

@hello-world-bfree

@hello-world-bfree hello-world-bfree commented Nov 15, 2023

Copy link
Copy Markdown

Fixes #4

When using the run method, if the env arg is not set an AttributeError occurs.

The issue can be shown with the following snippet:

import os

env = None

for k, v in os.environ.items():
    env[k] = env.get(k, v)

Since there is no method get on NoneType the attribute error is raised.

@flarco

flarco commented Nov 17, 2023

Copy link
Copy Markdown
Contributor

Thank you, fixed with 628d477

@flarco flarco closed this Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unset env creates AttributeError on sling.run()

2 participants