aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-08-28 17:22:16 +0000
committerMark Dickinson <dickinsm@gmail.com>2010-08-28 17:22:16 +0000
commit64a38c0eb5b7fd6e4ee5f3e912cff9eda8dd19af (patch)
tree457064e7557fbfd0538aba4e2a42d8acbd6f2328 /Lib/wave.py
parentStop packaging versioncheck. (diff)
downloadcpython-64a38c0eb5b7fd6e4ee5f3e912cff9eda8dd19af.tar.gz
cpython-64a38c0eb5b7fd6e4ee5f3e912cff9eda8dd19af.tar.bz2
cpython-64a38c0eb5b7fd6e4ee5f3e912cff9eda8dd19af.zip
Issue #1512791: In setframerate method of Wave_write, round non-integral
inputs to the nearest integer. Thanks Neil Tallim for the patch.
Diffstat (limited to 'Lib/wave.py')
-rw-r--r--Lib/wave.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/wave.py b/Lib/wave.py
index 2fa9b6b11fb..950d8e2ff25 100644
--- a/Lib/wave.py
+++ b/Lib/wave.py
@@ -355,7 +355,7 @@ class Wave_write:
raise Error('cannot change parameters after starting to write')
if framerate <= 0:
raise Error('bad frame rate')
- self._framerate = framerate
+ self._framerate = int(round(framerate))
def getframerate(self):
if not self._framerate: