Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-05-13 13:26:50 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-05-13 13:26:50 (GMT)
commit3c34f9d4375ca5da5c40d216994db9ed5a2f1154 (patch)
treec0228c0eb13cddc5d587464b86ae1bd7e74386a6 /plugins
parenta01b019f06771ba88db68d01fab32774049603ed (diff)
need to import CalledProcessError
Diffstat (limited to 'plugins')
-rw-r--r--plugins/audio_sensors/audiograb.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/plugins/audio_sensors/audiograb.py b/plugins/audio_sensors/audiograb.py
index 4765df4..6072c61 100644
--- a/plugins/audio_sensors/audiograb.py
+++ b/plugins/audio_sensors/audiograb.py
@@ -308,7 +308,6 @@ class AudioGrab():
(str(controls[0][0].props.untranslated_label)),
self.parent.running_sugar)
'''
-
if self.channels is None:
if hasattr(controls[0][0], 'num_channels'):
channels = controls[0][0].num_channels
@@ -386,14 +385,14 @@ class AudioGrab():
try:
output = subprocess.check_output(
['amixer', 'set', "%s" % (control), 'unmute'])
- except CalledProcessError:
+ except subprocess.CalledProcessError:
debug_output('Problem with amixer set "%s" unmute' % (control),
self.parent.running_sugar)
else:
try:
output = subprocess.check_output(
['amixer', 'set', "%s" % (control), 'mute'])
- except CalledProcessError:
+ except subprocess.CalledProcessError:
debug_output('Problem with amixer set "%s" mute' % (control),
self.parent.running_sugar)
@@ -421,7 +420,7 @@ class AudioGrab():
try:
output = subprocess.check_output(
['amixer', 'set', 'Master', "%d%s" % (master_val, '%')])
- except CalledProcessError:
+ except subprocess.CalledProcessError:
debug_output('Problem with amixer set Master',
self.parent.running_sugar)
@@ -437,7 +436,7 @@ class AudioGrab():
output = output[find(output, '[') + 1:]
output = output[:find(output, '%]')]
return int(output)
- except CalledProcessError:
+ except subprocess.CalledProcessError:
return 100
def set_bias(self, bias_state=False):
@@ -487,7 +486,7 @@ class AudioGrab():
if output == 'on':
return True
return False
- except CalledProcessError:
+ except subprocess.CalledProcessError:
return False
def set_dc_mode(self, dc_mode=False):
@@ -517,7 +516,7 @@ class AudioGrab():
if output == 'on':
return True
return False
- except CalledProcessError:
+ except subprocess.CalledProcessError:
return False
def set_mic_boost(self, mic_boost=False):
@@ -566,7 +565,7 @@ class AudioGrab():
if output == 'on':
return True
return False
- except CalledProcessError:
+ except subprocess.CalledProcessError:
return False
def set_capture_gain(self, capture_val):
@@ -580,7 +579,7 @@ class AudioGrab():
try:
output = subprocess.check_output(
['amixer', 'set', 'Capture', "%d%s" % (capture_val, '%')])
- except CalledProcessError:
+ except subprocess.CalledProcessError:
debug_output('Problem with amixer set Capture',
self.parent.running_sugar)
@@ -599,7 +598,7 @@ class AudioGrab():
output = output[find(output, '[') + 1:]
output = output[:find(output, '%]')]
return int(output)
- except CalledProcessError:
+ except subprocess.CalledProcessError:
debug_output('amixer: Could not get Capture level',
self.parent.running_sugar)
return 100
@@ -614,7 +613,7 @@ class AudioGrab():
try:
output = subprocess.check_output(
['amixer', 'set', 'Mic', "%d%s" % (mic_val, '%')])
- except CalledProcessError:
+ except subprocess.CalledProcessError:
debug_output('Problem with amixer set Mic',
self.parent.running_sugar)
@@ -630,7 +629,7 @@ class AudioGrab():
output = output[find(output, '[') + 1:]
output = output[:find(output, '%]')]
return int(output)
- except CalledProcessError:
+ except subprocess.CalledProcessError:
debug_output('amixer: Could not get Mic level',
self.parent.running_sugar)
return 100