equal
deleted
inserted
replaced
29 # Subsequent calls will go directly to the imported function. |
29 # Subsequent calls will go directly to the imported function. |
30 try: |
30 try: |
31 from hashlib import sha1 as _sha1 |
31 from hashlib import sha1 as _sha1 |
32 except ImportError: |
32 except ImportError: |
33 from sha import sha as _sha1 |
33 from sha import sha as _sha1 |
34 global _fastsha1 |
34 global _fastsha1, sha1 |
35 _fastsha1 = _sha1 |
35 _fastsha1 = sha1 = _sha1 |
36 return _sha1(s) |
36 return _sha1(s) |
37 |
37 |
38 import subprocess |
38 import subprocess |
39 closefds = os.name == 'posix' |
39 closefds = os.name == 'posix' |
40 def popen2(cmd, mode='t', bufsize=-1): |
40 def popen2(cmd, mode='t', bufsize=-1): |