aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/sndhdr.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sndhdr.py')
-rw-r--r--Lib/sndhdr.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/sndhdr.py b/Lib/sndhdr.py
index 96595c69744..a63b6fd2022 100644
--- a/Lib/sndhdr.py
+++ b/Lib/sndhdr.py
@@ -33,6 +33,7 @@ explicitly given directories.
__all__ = ['what', 'whathdr']
from collections import namedtuple
+import warnings
SndHeaders = namedtuple('SndHeaders',
'filetype framerate nchannels nframes sampwidth')
@@ -73,7 +74,9 @@ def whathdr(filename):
tests = []
def test_aifc(h, f):
- import aifc
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=DeprecationWarning)
+ import aifc
if not h.startswith(b'FORM'):
return None
if h[8:12] == b'AIFC':