diff options
-rw-r--r-- | jm2l/captcha.py | 4 | ||||
-rw-r--r-- | jm2l/upload.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/jm2l/captcha.py b/jm2l/captcha.py index 4fd6828..8ec778f 100644 --- a/jm2l/captcha.py +++ b/jm2l/captcha.py @@ -3,7 +3,7 @@ import random from PIL import Image, ImageDraw, ImageFont, ImageFilter -import StringIO +from io import BytesIO import math from pyramid.view import view_config from .words import TabMots @@ -145,7 +145,7 @@ def DoCaptcha(request): # Save Result request.session['Captcha'] = text #session.save() - ImgHandle = StringIO.StringIO() + ImgHandle = BytesIO() WorkImg.save(ImgHandle,'png') ImgHandle.seek(0) return Response(app_iter=ImgHandle, content_type = 'image/png') diff --git a/jm2l/upload.py b/jm2l/upload.py index cbbbfff..22281b8 100644 --- a/jm2l/upload.py +++ b/jm2l/upload.py @@ -9,7 +9,7 @@ from os import path import mimetypes import magic import subprocess -import cStringIO as StringIO +from io import StringIO # Database access imports from .models import User, Place, Tiers, Event |