[sugar] [PATCH 2/2] return 0, not None, if we can't get the mixer volume

Martin Dengler martin
Tue Jun 3 23:25:11 EDT 2008


---
 src/hardware/hardwaremanager.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/hardware/hardwaremanager.py b/src/hardware/hardwaremanager.py
index 29f5fba..2f92537 100644
--- a/src/hardware/hardwaremanager.py
+++ b/src/hardware/hardwaremanager.py
@@ -60,7 +60,7 @@ class HardwareManager(object):
     def get_volume(self):
         if not self._mixer or not self._master:
             logging.error('Cannot get the volume')
-            return None
+            return 0
 
         max_volume = self._master.max_volume
         min_volume = self._master.min_volume
-- 
1.5.5.1




More information about the Sugar-devel mailing list