Stray ProtocolError can lead to stack trace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Fix Released
|
Medium
|
Monty Taylor | ||
Liberty |
Fix Committed
|
Medium
|
Flavio Percoco |
Bug Description
We have a try/except which catches ProtocolError. This leads to:
Couldn't construct image object
Traceback (most recent call last):
File "/usr/local/
**kwargs)
File "/usr/local/
return client_
File "/usr/local/
module = utils.import_
File "/usr/local/
return importutils.
File "/usr/local/
__import_
File "/usr/local/
from glanceclient.
File "/usr/local/
from glanceclient.common import http
File "/usr/local/
ProtocolError = requests.
AttributeError: 'module' object has no attribute 'packages'
Error fetching image list: 'module' object has no attribute 'packages'
From Ian:
I think the whole try/except block here is just wrong given the current requirement on requests (https:/
This popped up in a much older version of requests where urllib3 added the ProtocolError and then started using it and requests missed its addition and it bubbled up. There should not be any reason to continue doing this silly try/except. We should just replace the usage of ProtocolError with requests.
Changed in python-glanceclient: | |
importance: | Undecided → Medium |
assignee: | nobody → Monty Taylor (mordred) |
https:/ /review. openstack. org/#/c/ 257558/