to python3 and beyond
This commit is contained in:
parent
7ead6e0555
commit
0b2e3a613d
|
@ -28,6 +28,7 @@ import json
|
|||
import magic
|
||||
import suds
|
||||
|
||||
from builtins import str
|
||||
from requests.exceptions import ConnectionError
|
||||
from django.db import models
|
||||
from django.core.urlresolvers import reverse
|
||||
|
@ -51,7 +52,7 @@ def get_client(model):
|
|||
|
||||
|
||||
def format_type(t):
|
||||
return {'id': unicode(t), 'text': unicode(t)}
|
||||
return {'id': str(t), 'text': str(t)}
|
||||
|
||||
|
||||
def format_file(f):
|
||||
|
|
|
@ -71,7 +71,7 @@ class Transport(HttpAuthenticated):
|
|||
return HttpAuthenticated.open(self, request)
|
||||
resp = self.model.requests.get(request.url, headers=request.headers,
|
||||
**self.get_requests_kwargs())
|
||||
return StringIO.StringIO(resp.content)
|
||||
return StringIO(resp.content)
|
||||
|
||||
def send(self, request):
|
||||
request.message = request.message.replace("contentType", "xm:contentType")
|
||||
|
|
Loading…
Reference in New Issue