diff options
author | Guido van Rossum <guido@python.org> | 1998-03-26 19:42:58 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-03-26 19:42:58 (GMT) |
commit | 41360a4696f488e49e5409b3b1baf1fff6ae0044 (patch) | |
tree | 9c9b73b7446cc9fc36e09038bf26d889bb5b6f24 /Lib/test/test_sunaudiodev.py | |
parent | cd0f59ea0824ad6f897f05c2db4d4471e47e6063 (diff) | |
download | cpython-41360a4696f488e49e5409b3b1baf1fff6ae0044.zip cpython-41360a4696f488e49e5409b3b1baf1fff6ae0044.tar.gz cpython-41360a4696f488e49e5409b3b1baf1fff6ae0044.tar.bz2 |
Mass check-in after untabifying all files that need it.
Diffstat (limited to 'Lib/test/test_sunaudiodev.py')
-rw-r--r-- | Lib/test/test_sunaudiodev.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Lib/test/test_sunaudiodev.py b/Lib/test/test_sunaudiodev.py index 7e9d1b1e..1438c09 100644 --- a/Lib/test/test_sunaudiodev.py +++ b/Lib/test/test_sunaudiodev.py @@ -3,29 +3,29 @@ import sunaudiodev import os def findfile(file): - if os.path.isabs(file): return file - import sys - path = sys.path - try: - path = [os.path.dirname(__file__)] + path - except NameError: - pass - for dn in path: - fn = os.path.join(dn, file) - if os.path.exists(fn): return fn - return file + if os.path.isabs(file): return file + import sys + path = sys.path + try: + path = [os.path.dirname(__file__)] + path + except NameError: + pass + for dn in path: + fn = os.path.join(dn, file) + if os.path.exists(fn): return fn + return file def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: - a = sunaudiodev.open('w') + a = sunaudiodev.open('w') except sunaudiodev.error, msg: - raise TestFailed, msg + raise TestFailed, msg else: - a.write(data) - a.close() + a.write(data) + a.close() def test(): play_sound_file(findfile('audiotest.au')) |