Daniel P. Berrange | 1 Oct 16:43
Picon
Favicon

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

On Wed, Oct 01, 2008 at 10:37:17AM -0400, Joey Boggs wrote:
> I'm done creating a sha256 hash setup should I offer more than just 
> sha256for now? and checksum generation is off by default
> 
> Here's a preview.  Not sure how to catch the module import failure for 
> hashlib though

If we go for doing a compulsory md5 checksum, and optional
sha256 checksum with new enough python, then something
like....

    try:
       import hashlib
       m1 = hashlib.md5()
       m2 = hashlib.sha256()
    except:
       import md5
       m1 = md5.new()
       m2 = None

 
Daniel
--

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Gmane