commit a6de4de65b01df6851fd573260fbbd8bbe53431f
Author: Dan Prince <email address hidden>
Date: Mon Aug 20 21:29:44 2012 -0400
Convert limiting_iter to LimitingReader.
Glance commit 3c69df5aa707b4216ef7001dbe28fa0a5912493c added a new
limiting_iter function in utils which we use to limit reads to
image data being uploaded. This simple generator doesn't work
with image backends like the Swift store which require a 'read'
method.
This patch swaps out the simple limiting_iter function for a
LimitingReader class which supports both 'read' and __iter__
functions.
Fixes LP Bug #1039212 which cause the exception below when used
with the previous code:
AttributeError: 'CooperativeReader' object has no attribute 'read'
Reviewed: https:/ /review. openstack. org/11686 github. com/openstack/ glance/ commit/ a6de4de65b01df6 851fd573260fbbd 8bbe53431f
Committed: http://
Submitter: Jenkins
Branch: master
commit a6de4de65b01df6 851fd573260fbbd 8bbe53431f
Author: Dan Prince <email address hidden>
Date: Mon Aug 20 21:29:44 2012 -0400
Convert limiting_iter to LimitingReader.
Glance commit 3c69df5aa707b42 16ef7001dbe28fa 0a5912493c added a new
limiting_iter function in utils which we use to limit reads to
image data being uploaded. This simple generator doesn't work
with image backends like the Swift store which require a 'read'
method.
This patch swaps out the simple limiting_iter function for a
LimitingReader class which supports both 'read' and __iter__
functions.
Fixes LP Bug #1039212 which cause the exception below when used
with the previous code:
AttributeError: 'CooperativeReader' object has no attribute 'read'
Change-Id: I87d9a30f7afe02 07386d621050312 374ced161d5