Show More
@@ -231,6 +231,10 b' def safe_str(unicode_, to_encoding=None)' | |||||
231 | :rtype: str |
|
231 | :rtype: str | |
232 | :returns: str object |
|
232 | :returns: str object | |
233 | """ |
|
233 | """ | |
|
234 | ||||
|
235 | # if it's not basestr cast to str | |||
|
236 | if not isinstance(unicode_, basestring): | |||
|
237 | return str(unicode_) | |||
234 |
|
238 | |||
235 | if isinstance(unicode_, str): |
|
239 | if isinstance(unicode_, str): | |
236 | return unicode_ |
|
240 | return unicode_ |
General Comments 0
You need to be logged in to leave comments.
Login now