Commits

Wang Dingwei committed 6528538

fixed TypeError in model.py

Comments (0)

Files changed (1)

         for lang in self.os_langs:
             try:
                 region = '(' + lang[1] + ')'
-            except IndexError:
+            except TypeError, IndexError:
                 region = ''
             lang_strs.append(lang[0] + region) 
         return lang_strs
                 region = '(' + ', '.join(self.sdr_lang[1]) + ')'
             else:
                 region = ''
-        except IndexError:
+        except IndexError, TypeError:
             region = ''
         return self.sdr_lang[0] + region