web/captcha.py
changeset 10609 e2d8e81bfe68
parent 10566 4c103a2c5e93
child 11405 5ba55f4c813a
--- a/web/captcha.py	Tue Sep 15 15:07:13 2015 +0200
+++ b/web/captcha.py	Tue Sep 15 16:56:57 2015 +0200
@@ -24,6 +24,8 @@
 from random import randint, choice
 from io import BytesIO
 
+from six.moves import range
+
 from PIL import Image, ImageFont, ImageDraw, ImageFilter
 
 
@@ -51,7 +53,7 @@
     draw = ImageDraw.Draw(img)
     # draw 100 random colored boxes on the background
     x, y = img.size
-    for num in xrange(100):
+    for num in range(100):
         draw.rectangle((randint(0, x), randint(0, y),
                         randint(0, x), randint(0, y)),
                        fill=randint(0, 0xffffff))