Show More
@@ -28,9 +28,9 b' def _fastsha1(s):' | |||
|
28 | 28 | # This function will import sha1 from hashlib or sha (whichever is |
|
29 | 29 | # available) and overwrite itself with it on the first call. |
|
30 | 30 | # Subsequent calls will go directly to the imported function. |
|
31 | try: | |
|
31 | if sys.version_info >= (2, 5): | |
|
32 | 32 | from hashlib import sha1 as _sha1 |
|
33 | except ImportError: | |
|
33 | else: | |
|
34 | 34 | from sha import sha as _sha1 |
|
35 | 35 | global _fastsha1, sha1 |
|
36 | 36 | _fastsha1 = sha1 = _sha1 |
General Comments 0
You need to be logged in to leave comments.
Login now