Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/docs_server_utils.py |
| diff --git a/chrome/common/extensions/docs/server2/docs_server_utils.py b/chrome/common/extensions/docs/server2/docs_server_utils.py |
| index 7fe962e7a977121920ca381408bb7ee76fde59d9..6acea0270cc494504c0ce28afcc903ce3bb56b30 100644 |
| --- a/chrome/common/extensions/docs/server2/docs_server_utils.py |
| +++ b/chrome/common/extensions/docs/server2/docs_server_utils.py |
| @@ -54,7 +54,11 @@ def MarkFirstAndLast(dicts): |
| def ToUnicode(data): |
| '''Returns the str |data| as a unicode object. It's expected to be utf8, but |
| there are also latin-1 encodings in there for some reason. Fall back to that. |
| + |
| + Returns None if given None. |
| ''' |
| + if data is None: |
| + return None |
|
Ken Rockot(use gerrit already)
2015/05/26 00:26:24
I was having a very bad time trying to track down
|
| try: |
| return unicode(data, 'utf-8') |
| except: |