[Sugar-devel] [PATCH 09/21 sugar-toolkit] PEP8 cleanup: fix deprecated raise syntax

Simon Schampijer simon at schampijer.de
Fri Oct 29 06:52:29 EDT 2010


Reviewed-by: Simon Schampijer simon at laptop.org

On 10/15/2010 11:01 PM, Sascha Silbe wrote:
> Signed-off-by: Sascha Silbe<sascha-pgp at silbe.org>
>
> diff --git a/src/sugar/graphics/style.py b/src/sugar/graphics/style.py
> index d5f82ff..7f48d9a 100644
> --- a/src/sugar/graphics/style.py
> +++ b/src/sugar/graphics/style.py
> @@ -83,7 +83,7 @@ class Color(object):
>           if html_color[0] == '#':
>               html_color = html_color[1:]
>           if len(html_color) != 6:
> -            raise ValueError, "input #%s is not in #RRGGBB format" % html_color
> +            raise ValueError('input #%s is not in #RRGGBB format' % html_color)
>
>           r, g, b = html_color[:2], html_color[2:4], html_color[4:]
>           r, g, b = [int(n, 16) for n in (r, g, b)]
> --
> 1.7.1
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



More information about the Sugar-devel mailing list