[Python-modules-commits] r21904 - in packages/python-crypto/trunk/debian/patches (1 file)

sramacher-guest at users.alioth.debian.org sramacher-guest at users.alioth.debian.org
Thu May 24 15:12:59 UTC 2012


    Date: Thursday, May 24, 2012 @ 15:12:57
  Author: sramacher-guest
Revision: 21904

Really remove posixread.patch. Thanks jwilk.

Deleted:
  packages/python-crypto/trunk/debian/patches/posixread.patch

Deleted: packages/python-crypto/trunk/debian/patches/posixread.patch
===================================================================
--- packages/python-crypto/trunk/debian/patches/posixread.patch	2012-05-24 15:05:43 UTC (rev 21903)
+++ packages/python-crypto/trunk/debian/patches/posixread.patch	2012-05-24 15:12:57 UTC (rev 21904)
@@ -1,31 +0,0 @@
-Description: fix incorrect assumption about the data returned from read
- read may return less data than requested even if there is enough data available
- to read.
-Author: Sebastian Ramacher <s.ramacher at gmx.at>
-Last-Update: 2012-01-20
-Forwarded: http://lists.dlitz.net/pipermail/pycrypto/2012q1/000546.html
-
-diff --git a/lib/Crypto/Random/OSRNG/posix.py b/lib/Crypto/Random/OSRNG/posix.py
-index f88cd77..234edfe 100644
---- a/lib/Crypto/Random/OSRNG/posix.py
-+++ b/lib/Crypto/Random/OSRNG/posix.py
-@@ -46,7 +46,6 @@ class DevURandomRNG(BaseRNG):
-             raise TypeError("%r is not a character special device" % (self.name,))
- 
-         self.__file = f
--        self._read = f.read
- 
-         BaseRNG.__init__(self)
- 
-@@ -54,7 +53,10 @@ class DevURandomRNG(BaseRNG):
-         self.__file.close()
- 
-     def _read(self, N):
--        return self.__file.read(N)
-+        data = self.__file.read(N)
-+        while len(data) < N:
-+            data += self.__file.read(N - len(data))
-+        return data
- 
- def new(*args, **kwargs):
-     return DevURandomRNG(*args, **kwargs)




More information about the Python-modules-commits mailing list