Use hashlib if possible

* wcs/qommon/ident/password_accounts.py:
   try to import hashlib.sha1 (to be used since python 2.5) instead of
   sha if possible.
This commit is contained in:
Benjamin Dauvergne 2009-04-03 07:50:57 +00:00
parent 2960fc89b0
commit 0ce8dde656
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,7 @@
from sha import sha
try:
from hashlib import sha1 as sha
except ImportError:
from sha import sha
from quixote import get_publisher