/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
659
659
except (NotImplementedError, AttributeError):
660
660
    # If python doesn't have os.urandom, or it doesn't work,
661
661
    # then try to first pull random data from /dev/urandom
662
 
    if os.path.exists("/dev/urandom"):
 
662
    try:
663
663
        rand_bytes = file('/dev/urandom', 'rb').read
664
664
    # Otherwise, use this hack as a last resort
665
 
    else:
 
665
    except (IOError, OSError):
666
666
        # not well seeded, but better than nothing
667
667
        def rand_bytes(n):
668
668
            import random