forked from extern/django-helpdesk
Use Django's six module for StringIO imports.
This commit is contained in:
parent
07f7489e2c
commit
f34696df8d
@ -8,10 +8,7 @@ forms.py - Definitions of newforms-based forms for creating and maintaining
|
||||
"""
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
from io import StringIO
|
||||
from django.utils.six import StringIO
|
||||
|
||||
from django import forms
|
||||
from django.forms import extras
|
||||
|
@ -1388,7 +1388,7 @@ class CustomField(models.Model):
|
||||
)
|
||||
|
||||
def _choices_as_array(self):
|
||||
from StringIO import StringIO
|
||||
from django.utils.six import StringIO
|
||||
valuebuffer = StringIO(self.list_values)
|
||||
choices = [[item.strip(), item.strip()] for item in valuebuffer.readlines()]
|
||||
valuebuffer.close()
|
||||
|
Loading…
Reference in New Issue
Block a user