Matej Cepl
9abff58a55
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=258
23 lines
900 B
Diff
23 lines
900 B
Diff
From ae0ed14794ced2c51c822fc6f0d3ca92064619dd Mon Sep 17 00:00:00 2001
|
|
From: BT123 <abcdyzhang@163.com>
|
|
Date: Fri, 17 Nov 2017 16:45:45 +0800
|
|
Subject: [PATCH] bug in wave.py
|
|
|
|
---
|
|
Lib/wave.py | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
Index: Python-2.7.13/Lib/wave.py
|
|
===================================================================
|
|
--- Python-2.7.13.orig/Lib/wave.py 2018-06-07 17:00:25.370728844 +0000
|
|
+++ Python-2.7.13/Lib/wave.py 2018-06-07 17:02:51.768202800 +0000
|
|
@@ -272,6 +272,8 @@ class Wave_read:
|
|
self._sampwidth = (sampwidth + 7) // 8
|
|
else:
|
|
raise Error, 'unknown format: %r' % (wFormatTag,)
|
|
+ if self._nchannels == 0:
|
|
+ raise Error, "The audio file in wav format should have at least one channel!"
|
|
self._framesize = self._nchannels * self._sampwidth
|
|
self._comptype = 'NONE'
|
|
self._compname = 'not compressed'
|