summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-01-01 17:27:30 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-01-01 17:27:30 (GMT)
commit1b34d2552c2cb2369130291a8a9ae973753b4072 (patch)
tree5bfcf8b49745280e0a92a49ef2102d81c3674b68 /Lib/os.py
parentedfe72f66fd789d65b0c7125540c08d3e98a901e (diff)
downloadcpython-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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/os.py b/Lib/os.py
index e8a0113..12ebbcb 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -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)