Diego Búrigo Zacarão  committed b88c5d9

Fixed encode error with localized exception messages

  • Participants
  • Parent commits f9c6790
  • Branches default

Comments (0)

Files changed (1)

File transifex/storage/

                 except Exception, e:
                     if isinstance(e, FileCheckError) or isinstance(e, LinguistParseError):
-                        message = str(e)
+                        #FIXME: Custom Exception should use an extra attr for 
+                        # localized string.
+                        message = e.message
                         #TODO Send email to admins
                         message = _("A strange error happened.")
+                        logger.debug(str(e))
                     # The object is not saved yet, but it removes file from 
                     # the filesystem
                         id__in=[f['id'] for f in files]).delete()
-                    logger.debug(str(e))
                     retval=dict(status='Error', message=message)
             if not retval: