[et-mgmt-tools] [patch] virt-convert add disk signature into virt-image format export
Cole Robinson
crobinso at redhat.com
Tue Sep 30 21:43:37 UTC 2008
Joey Boggs wrote:
> Here's a sample that works, just want to verify it's alright. Is 64MB
> too much/too little to read at one time?
>
64MB certainly would be too much, but the below code
is using 64KB :) Should be fine.
>
> f = open("test.raw","r")
> m = sha.new()
> while 1:
> chunk = f.read(65536)
> if not chunk:
> break
> m.update(chunk)
> print m.hexdigest()
>
Thanks,
Cole
More information about the et-mgmt-tools
mailing list