[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [et-mgmt-tools] [patch] virt-convert add disk signature into virt-image format export



hehe yeah i realized that a sec ago but didnt want to waste an email correcting myself.



Cole Robinson wrote:
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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]