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 two cases of bad indentation in exception handling code #26

Merged
merged 1 commit into from
Jul 23, 2017
Merged

fix two cases of bad indentation in exception handling code #26

merged 1 commit into from
Jul 23, 2017

Conversation

rolinh
Copy link

@rolinh rolinh commented Jul 23, 2017

This PR fixes two cases of bad code indentation in exception handling code.

Copy link

@saadkadhi saadkadhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this.

@nadouani nadouani changed the base branch from master to develop July 23, 2017 13:23
@nadouani nadouani merged commit 52b42cd into TheHive-Project:develop Jul 23, 2017
@rolinh rolinh deleted the fix-bad-indentation branch July 23, 2017 13:27
@rolinh
Copy link
Author

rolinh commented Jul 23, 2017

On a side note, it is quite brutal to call sys.exit() on a request exception. This prevents any client of the library from handling this case properly.

IMHO, it would be better to create a custom exception, say TheHiveException for instance, and wrap the underlying requests exception when it occurs. This way, a client can properly handle the exception and deal with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants