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

AzureException always raised as KeyError #62

Closed
monika-moeddel-by opened this issue Oct 26, 2017 · 1 comment · Fixed by #67
Closed

AzureException always raised as KeyError #62

monika-moeddel-by opened this issue Oct 26, 2017 · 1 comment · Fixed by #67
Assignees

Comments

@monika-moeddel-by
Copy link

monika-moeddel-by commented Oct 26, 2017

Hi,
when trying to put a file to an azure blob storage

store.put_file('myfile.txt','myfile.txt')

this confusing KeyError was returned:
File "...lib/python2.7/site-packages/simplekv/__init__.py", line 177, in put_file return self._put_filename(key, file) File "...lib/python2.7/site-packages/simplekv/net/azurestore.py", line 123, in _put_filename return key File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "...lib/python2.7/site-packages/simplekv/net/azurestore.py", line 38, in map_azure_exceptions raise KeyError(key) KeyError: 'myfile.txt'

In this case the cause was a missing internet connecting. Could you please consider to improve the exception handling and not raise all AzureException as KeyError.

@fmarczin
Copy link
Collaborator

It looks like in this case the exception handling suppresses important information. I will try to come up with a patch.

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 a pull request may close this issue.

3 participants