Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: convert sys.exit(1) to ValueError in DataDiscoveryCLI #1020

Merged
merged 2 commits into from Feb 1, 2024

Conversation

ikrommyd
Copy link
Contributor

@ikrommyd ikrommyd commented Feb 1, 2024

I was getting NameError: name 'exit' is not defined from these statments and not a proper exit.

@lgray lgray changed the title fix: fix NameError: name 'exit' is not defined fix: use sys.exit(1) in DataDiscoveryCLI it's a python module and not a script Feb 1, 2024
@lgray lgray changed the title fix: use sys.exit(1) in DataDiscoveryCLI it's a python module and not a script fix: use sys.exit(1) in DataDiscoveryCLI Feb 1, 2024
@lgray
Copy link
Collaborator

lgray commented Feb 1, 2024

Shouldn't this raise an exception instead? sys.exit can't be handled by any code that calls this class.

@ikrommyd
Copy link
Contributor Author

ikrommyd commented Feb 1, 2024

Yeah probably. I believe @valsdav was thinking actual cli here. I'll change it to whatever y'all want

@valsdav
Copy link
Contributor

valsdav commented Feb 1, 2024

Hi! right, better to raise an exception there!

@ikrommyd
Copy link
Contributor Author

ikrommyd commented Feb 1, 2024

Then converting the print statement to a ValueError should be good for both in-script/notebook and cli use

@ikrommyd ikrommyd changed the title fix: use sys.exit(1) in DataDiscoveryCLI fix: convert sys.exit(1) to ValueError in DataDiscoveryCLI Feb 1, 2024
@lgray lgray enabled auto-merge February 1, 2024 14:50
@lgray lgray merged commit 3428ee2 into CoffeaTeam:master Feb 1, 2024
15 checks passed
@ikrommyd ikrommyd deleted the fix-exit branch February 1, 2024 17:12
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.

None yet

3 participants