##// END OF EJS Templates
util: fake the builtin buffer if it's missing (jython)
Ronny Pfannschmidt -
r10756:cb681cc5 default
parent child Browse files
Show More
@@ -36,6 +36,13 b' def _fastsha1(s):'
36 _fastsha1 = sha1 = _sha1
36 _fastsha1 = sha1 = _sha1
37 return _sha1(s)
37 return _sha1(s)
38
38
39 import __builtin__
40
41 def fakebuffer(sliceable, offset=0):
42 return sliceable[offset:]
43 if not hasattr(__builtin__, 'buffer'):
44 __builtin__.buffer = fakebuffer
45
39 import subprocess
46 import subprocess
40 closefds = os.name == 'posix'
47 closefds = os.name == 'posix'
41
48
General Comments 0
You need to be logged in to leave comments. Login now