summaryrefslogtreecommitdiff
path: root/Lib/os.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-01-01 17:27:30 +0000
committerMark Dickinson <dickinsm@gmail.com>2010-01-01 17:27:30 +0000
commit3e177ab0b393a415c36f5fc41012f59fff5860fb (patch)
tree1b6706772fbcdd8171857ee5ca29c1d822d54d42 /Lib/os.py
parent6e75924b2380786cde6accd94fe1a3a740625df0 (diff)
downloadcpython-3e177ab0b393a415c36f5fc41012f59fff5860fb.tar.gz
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 e8a011337c..12ebbcb517 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)