Fix: TypeError: 'NoneType' object is not iterable.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 28 Sep 2016 21:02:57 +0300
changeset 586 1ddf73757bff
parent 585 d58bd4c13948
child 587 caf484e75e19
Fix: TypeError: 'NoneType' object is not iterable.
py/gadict_srs_tab.py
--- a/py/gadict_srs_tab.py	Wed Sep 28 20:58:56 2016 +0300
+++ b/py/gadict_srs_tab.py	Wed Sep 28 21:02:57 2016 +0300
@@ -71,7 +71,7 @@
                 FOUT.write("<br>")
             else:
                 FOUT.write(" ")
-        for (lang, tr) in sense.tr_list:
+        for (lang, tr) in sense.tr_list or []:
             tr = tr.replace('\n', ' ')
             if LANGS is None:
                 FOUT.write(tr)