PEP8 cleanup: fix deprecated raise syntax

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
This commit is contained in:
Sascha Silbe 2010-10-15 18:39:50 +00:00
parent 9c7769cc21
commit 5f8ec81023

View File

@ -83,7 +83,7 @@ class Color(object):
if html_color[0] == '#': if html_color[0] == '#':
html_color = html_color[1:] html_color = html_color[1:]
if len(html_color) != 6: 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 = html_color[:2], html_color[2:4], html_color[4:]
r, g, b = [int(n, 16) for n in (r, g, b)] r, g, b = [int(n, 16) for n in (r, g, b)]