1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00
freebsd-ports/devel/bzr/files/patch-bzrlib_osutils.py
Jean-Yves Lefort 4a9535e4ef Add bazaar-ng.
Bazaar-NG is an implementation of GNU arch from Canonical written in Python.
Arch is a version control system, which allows you to keep old versions of
files and directories (usually source code), keep a log of who, when, and
why changes occurred, etc., like SVN, CVS, or RCS. Arch is distributed, which
gives it significant advantages and some disadvantages compared to SVN and
CVS. The bzr implementation is the next Bazaar version from Canonical called
Bazaar-NG.

WWW: http://www.bazaar-ng.org/

PR:		ports/87849
Submitted by:	Ulf Lilleengen <lulf@kerneled.org>
2005-10-28 09:36:43 +00:00

16 lines
574 B
Python

--- bzrlib/osutils.py.orig Fri Oct 28 11:30:13 2005
+++ bzrlib/osutils.py Fri Oct 28 11:30:38 2005
@@ -448,10 +448,10 @@
except (NotImplementedError, AttributeError):
# If python doesn't have os.urandom, or it doesn't work,
# then try to first pull random data from /dev/urandom
- if os.path.exists("/dev/urandom"):
+ try:
rand_bytes = file('/dev/urandom', 'rb').read
# Otherwise, use this hack as a last resort
- else:
+ except:
# not well seeded, but better than nothing
def rand_bytes(n):
import random