You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: