Permalink
Browse files

Fixed sytnax error on ValueErrors.

  • Loading branch information...
1 parent ce701e8 commit 2850448f58fbd16abd3f9cb97be60c4577cae374 @atadams committed Jan 29, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 Hex-to-HSL-color.py
View
@@ -14,9 +14,9 @@ def run(self, edit):
def rgb_to_hsl(self,r,g,b):
# From http://sebsauvage.net/python/snyppets/#hsl
- if not (0 <= r <=255): raise ValueError,"r (red) parameter must be between 0 and 255."
- if not (0 <= g <=255): raise ValueError,"g (green) parameter must be between 0 and 255."
- if not (0 <= b <=255): raise ValueError,"b (blue) parameter must be between 0 and 255."
+ if not (0 <= r <=255): raise ValueError("r (red) parameter must be between 0 and 255.")
+ if not (0 <= g <=255): raise ValueError("g (green) parameter must be between 0 and 255.")
+ if not (0 <= b <=255): raise ValueError("b (blue) parameter must be between 0 and 255.")
var_R = r/255.0
var_G = g/255.0

0 comments on commit 2850448

Please sign in to comment.