Jason Gerard DeRose wrote:
On Fri, 2010-02-12 at 10:56 -0500, Rob Crittenden wrote:
Fix a deprecation warning importing sha.


nack.  There is no `sha` attribute in the `hashlib` module; instead,
you'll need to use `hashlib.sha1`, like this:

        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.  ;)

Gah, good catch. Fixed and pushed.


Freeipa-devel mailing list

Reply via email to