#! /bin/sh /usr/share/dpatch/dpatch-run ## 29_fix_urandom_error.dpatch by Cameron Dale ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: patch interesting error where urandom is available in os.py but not implemented on the os level ## DP: Taken from upstream's CVS. @DPATCH@ --- bittornado.orig/BitTornado/BTcrypto.py +++ bittornado/BitTornado/BTcrypto.py @@ -6,6 +6,7 @@ from random import randrange,randint,seed try: from os import urandom + urandom(1) except: seed() urandom = lambda x: ''.join([chr(randint(0,255)) for i in xrange(x)])