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

Tomeu Vizoso tomeu
Tue Jun 10 03:25:43 EDT 2008


r+ Thanks!

On Wed, Jun 4, 2008 at 5:25 AM, Martin Dengler <martin at martindengler.com> wrote:
> ---
>  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
>
> _______________________________________________
> Sugar mailing list
> Sugar at lists.laptop.org
> http://lists.laptop.org/listinfo/sugar
>



More information about the Sugar-devel mailing list