removed duplicated code, using pydal's _compat.py

This commit is contained in:
mdipierro
2016-08-01 03:39:22 -05:00
parent 4519985dc2
commit 35eaba1096
51 changed files with 87 additions and 232 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ Contains the classes for the global used variables:
- Session
"""
from gluon._compat import pickle, StringIO, copyreg, Cookie, urlparse, PY2, iteritems, to_unicode, to_native, unicodeT
from pydal._compat import pickle, StringIO, copyreg, Cookie, urlparse, PY2, iteritems, to_unicode, to_native, unicodeT
from gluon.storage import Storage, List
from gluon.streamer import streamer, stream_file_or_304_or_206, DEFAULT_CHUNK_SIZE
from gluon.contenttype import contenttype
@@ -436,7 +436,7 @@ class Response(Storage):
self._vars.update(b)
self._view_environment.update(self._vars)
if view:
from gluon._compat import StringIO
from pydal._compat import StringIO
(obody, oview) = (self.body, self.view)
(self.body, self.view) = (StringIO(), view)
run_view_in(self._view_environment)