|
|
@@ -6,7 +6,7 @@ globals attached to frappe module |
|
|
|
""" |
|
|
|
from __future__ import unicode_literals, print_function |
|
|
|
|
|
|
|
from six import iteritems, text_type, string_types |
|
|
|
from six import iteritems, binary_type, text_type, string_types |
|
|
|
from werkzeug.local import Local, release_local |
|
|
|
import os, sys, importlib, inspect, json |
|
|
|
|
|
|
@@ -61,7 +61,7 @@ def as_unicode(text, encoding='utf-8'): |
|
|
|
return text |
|
|
|
elif text==None: |
|
|
|
return '' |
|
|
|
elif isinstance(text, string_types): |
|
|
|
elif isinstance(text, binary_type): |
|
|
|
return text_type(text, encoding) |
|
|
|
else: |
|
|
|
return text_type(text) |
|
|
|