summaryrefslogtreecommitdiff
blob: fd24b7762af53b5482646ff308bb3470e2c65b3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- usr/lib/transgaming_point2play/tests/test_sound.py.orig	2003-09-16 14:04:31.000000000 -0400
+++ usr/lib/transgaming_point2play/tests/test_sound.py	2003-10-07 15:17:36.044822360 -0400
@@ -12,14 +12,21 @@
 import wave
 import os, os.path
 
-import ossaudiodev
-
+disable_oss = 0;
+try:
+	import ossaudiodev
+except:
+	print "Python 2.3 not found.  Disabling oss audio tests."
+	disable_oss = 1;
 
 TESTS = (_("Test For Sound Support"), "tgtest_sound", False),
 
 def tgtest_sound():
     """runs a test to ensure that sound output is working"""
 
+    if disable_oss:
+        return ((_('Basic sound test'), _('Test is disabled.'), 'red'),)
+
     try:
         try:
             P2PPATH=os.environ["P2PPATH"] + "/"
@@ -56,6 +63,11 @@
     return ((_('Basic sound test'), _('Completed successfully\nDid you hear the sound?'), 'green'),)
 
 def tgtest_sound_description():
+    if disable_oss:
+        return _('This test has been disabled.\n') + \
+               _('Please see:\n') + \
+               _('http://bugs.gentoo.org/show_bug.cgi?id=30556\n') + \
+               _('for more information.')
     return _('This test attempts to play a sound\n') + \
            _('file at 44 khz. This test uses the\n') + \
            _('same method as WineX to play sound\n') + \