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