~brendan-donegan/checkbox/bug1085219

« back to all changes in this revision

Viewing changes to scripts/audio_question

  • Committer: Marc Tardif
  • Date: 2007-10-04 23:12:10 UTC
  • Revision ID: marc.tardif@canonical.com-20071004231210-unxckndkgndxfdp6
Refactored questions to use templates and scripts which fixes bug #149195.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
import gnome
 
4
import os
 
5
 
 
6
from hwtest.constants import HWTEST_DIR
 
7
 
 
8
gnome.sound_init("localhost")
 
9
sound_file = os.path.join(HWTEST_DIR, "data", "sound.wav")
 
10
gnome.sound_play(sound_file)
 
11
 
 
12
device = "None"
 
13
path = "/proc/asound/card0/id"
 
14
if os.path.exists(path):
 
15
    fd = file(path, "r")
 
16
    device = fd.readline().strip()
 
17
 
 
18
print device