diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-01-01 17:27:30 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-01-01 17:27:30 (GMT) |
commit | 1b34d2552c2cb2369130291a8a9ae973753b4072 (patch) | |
tree | 5bfcf8b49745280e0a92a49ef2102d81c3674b68 /Lib/os.py | |
parent | edfe72f66fd789d65b0c7125540c08d3e98a901e (diff) | |
download | cpython-1b34d2552c2cb2369130291a8a9ae973753b4072.zip cpython-1b34d2552c2cb2369130291a8a9ae973753b4072.tar.gz cpython-1b34d2552c2cb2369130291a8a9ae973753b4072.tar.bz2 |
Issue #5080: turn the DeprecationWarning from float arguments passed
to integer PyArg_Parse* format codes into a TypeError. Add a
DeprecationWarning for floats passed with the 'L' format code, which
didn't previously have a warning.
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -752,7 +752,7 @@ if not _exists("urandom"): raise NotImplementedError("/dev/urandom (or equivalent) not found") try: bs = b"" - while n - len(bs) >= 1: + while n > len(bs): bs += read(_urandomfd, n - len(bs)) finally: close(_urandomfd) |