Davide Alberani committed 43bb5e5

fail-safe for wrong character names

Comments (0)

Files changed (1)


     def set_name(self, name):
         """Set the name of the character."""
         # XXX: convert name to unicode, if it's a plain string?
-        d = analyze_name(name, canonical=0)
+        try:
+            d = analyze_name(name, canonical=0)
+        except:
+            # TODO: catch only IMDbPYParserError and issue a warning.
+            pass
     def _additional_keys(self):
         """Valid keys to append to the data.keys() list."""