[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
In ask-sdk-webservice-support, in verifier.py, in _load_cert_chain(), there is the following line: "with urlopen(cert_url) as cert_response:".
Expected Behavior
urlopen() should read the document from the provided URL into cert_response
Current Behavior
This does not work in Python 2.7 and causes an "AttributeError:addinfourl instance has no attribute 'exit'" exception. This is because you can't use any random object in a with ... as statement and there isn't any context manager implemented for urlopen (unlike in Python3 where there is one)
Possible Solution
// Not required, but suggest a fix/reason for the bug,
// or ideas how to implement the addition or change
The line in question should therefore be replaced by e.g. "cert_response = urlopen(cert_url)" and the following section should have the indent changed accordingly.
Steps to Reproduce (for bugs)
// Provide a self-contained, concise snippet of code
// For more complex issues provide a repo with the smallest sample that reproduces the bug
// Including business logic or unrelated code makes diagnosis more difficult
Just run on Python 2.7
Context
The crash does not allow to use ask-sdk-webservice-support out of the box
Your Environment
ASK SDK for Python used: Latest downloaded from GitHub: "Latest commit 6a74ecc on Aug 23"
I'm submitting a...
In ask-sdk-webservice-support, in verifier.py, in _load_cert_chain(), there is the following line: "with urlopen(cert_url) as cert_response:".
Expected Behavior
urlopen() should read the document from the provided URL into cert_response
Current Behavior
This does not work in Python 2.7 and causes an "AttributeError:addinfourl instance has no attribute 'exit'" exception. This is because you can't use any random object in a with ... as statement and there isn't any context manager implemented for urlopen (unlike in Python3 where there is one)
Possible Solution
The line in question should therefore be replaced by e.g. "cert_response = urlopen(cert_url)" and the following section should have the indent changed accordingly.
Steps to Reproduce (for bugs)
Just run on Python 2.7
Context
The crash does not allow to use ask-sdk-webservice-support out of the box
Your Environment
Python version info