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

get_directory_as_zip method is not raising an error for false or missing credentials #244

Open
Micromegass opened this issue May 11, 2020 · 0 comments

Comments

@Micromegass
Copy link

Micromegass commented May 11, 2020

When using the method get_directory_as_zip and valid credentials to access the cloud are not provided or the credentials are wrong the method goes ahead and saves a corrupt zip-file. Or rather a zip file without content but it still returns the boolean value True.

This results in a misleading error messages for further code. For instance, if a method to unzip the file after the download is being written, a BadZipFile error is raised misplacing the location of the error.

My suggestion would be to catch this error in the get_directory_as_zip method and not return the boolean True for this case. In general, I think it would be better to not return a boolean but rather the status code so it is more flexible. Another option would be to solve this directly in the login method.

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

No branches or pull requests

2 participants