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. |
not at google - send to devlin
2015/06/04 22:40:45
I would prefer if call sites checked for this. sen
Ken Rockot(use gerrit already)
2015/06/05 00:21:50
Upon further inspection the bug which was causing
|
''' |
+ if data is None: |
+ return None |
try: |
return unicode(data, 'utf-8') |
except: |