Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:sschapiro:openstack:upstream
euca2ools
318-fix-check-image.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 318-fix-check-image.patch of Package euca2ools
Description: fix bug in check_image so that sha1sum is correctly done Author: Scott Moser <scott.moser@canonical.com> Last-Update: 2010-11-29 Upstream: r318 ------------------------------------------------------------ --- a/euca2ools/euca2ools/__init__.py +++ b/euca2ools/euca2ools/__init__.py @@ -716,11 +716,10 @@ print 'Image Size:', image_size, 'bytes' in_file = open(image_file, 'rb') sha_image = sha() - while 1: + buf = in_file.read(IMAGE_IO_CHUNK) + while buf: + sha_image.update(buf) buf = in_file.read(IMAGE_IO_CHUNK) - if not buf: - break - sha_image.update(buf) return (image_size, hexlify(sha_image.digest())) def tarzip_image(
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor