Author: Armin Rigo <[email protected]>
Branch:
Changeset: r57245:b25180f1456d
Date: 2012-09-08 11:51 +0200
http://bitbucket.org/pypy/pypy/changeset/b25180f1456d/
Log: Python 2.5 compat
diff --git a/pypy/rlib/rurandom.py b/pypy/rlib/rurandom.py
--- a/pypy/rlib/rurandom.py
+++ b/pypy/rlib/rurandom.py
@@ -1,6 +1,7 @@
"""The urandom() function, suitable for cryptographic use.
"""
+from __future__ import with_statement
import os, sys
import errno
@@ -84,7 +85,7 @@
while n > 0:
try:
data = os.read(fd, n)
- except OSError as e:
+ except OSError, e:
if e.errno != errno.EINTR:
raise
data = ''
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit