aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2015-02-28 22:21:44 +0100
committerpiernov <piernov@piernov.org>2015-02-28 22:21:44 +0100
commit934110a7d7948a8b4e423df2469247491b861d44 (patch)
treea156b369f722184214594fa3b50fd3aed47b778f
parent383794344552b67ee3028188fd344caf488212ea (diff)
downloadjm2l-934110a7d7948a8b4e423df2469247491b861d44.tar.gz
jm2l-934110a7d7948a8b4e423df2469247491b861d44.tar.bz2
jm2l-934110a7d7948a8b4e423df2469247491b861d44.tar.xz
jm2l-934110a7d7948a8b4e423df2469247491b861d44.zip
Fix StringIO includes
-rw-r--r--jm2l/captcha.py4
-rw-r--r--jm2l/upload.py2
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