On 02/12/2010 02:57 PM, Jason Gerard DeRose wrote:
On Fri, 2010-02-12 at 10:56 -0500, Rob Crittenden wrote:
Fix a deprecation warning importing sha.
rob
nack. There is no `sha` attribute in the `hashlib` module; instead,
you'll need to use `hashlib.sha1`, like this:
try:
from hashlib import sha1 as sha
except ImportError:
from sha import sha
I'd like to start consolidating these Python compatibility hacks in the
`ipalib.compat` module. But in the case of the `uuid` module, with its
funky imports inside of functions, we should probably keep our
modifications to a minimum.
So I agree with your approach. ack once you fix the import. ;)
FWIW, python-nss has:
hash_buf (specify any hash algorithm supported my NSS)
md5_digest
sha1_digest
sha256_digest
sha512_digest
--
John Dennis <jden...@redhat.com>
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel