django-awesome-avatar
django-awesome-avatar copied to clipboard
Added compatibility for StringIO when Python 3.x is being used
I was having problems using Python 3.5.3 with Django 1.11, so I checked the error and it was a subtile incompatibility with Python 3.x. Now it can use the classes it was trying to import, and if it returns an error, it can try to import the Python 3.x class.
HI! Thank you all for the great effort I think that the amendment must be made, as the owner of the problem said. I do not think that there is a big change in that, or that it conflicts with something existing. Good luck🙂
try:
from cStringIO import StringIO
except ImportError:
try:
from StringIO import StringIO
except ImportError:
from io import StringIO