ana-balica  committed bea488a

unicode literals for email subject

  • Participants
  • Parent commits 337b8bb

Comments (0)

Files changed (1)

File MoinMoin/

 # Copyright: 2008 MoinMoin:ThomasWaldmann
 # Copyright: 2007 MoinMoin:JohannesBerg
 # License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
     MoinMoin - init "logging" system
     """ A custom handler class which sends email for each logging event using
     wiki mail configuration
-    def __init__(self, toaddrs=[], subject=''):
+    def __init__(self, toaddrs=[], subject=u''):
         """ Initialize the handler
         @param toaddrs: address or a list of email addresses whom to send email
-        @param subject: email's subject
+        @param subject: unicode email's subject
         if isinstance(toaddrs, basestring):
         # arguments and make the decision to send mail or not here
         toaddrs = self.toaddrs if self.toaddrs else cfg.admin_emails
         log_level = logging.getLevelName(self.level)
-        subject = self.subject if self.subject else '[{0}][{1}] Log message'.format(
+        subject = self.subject if self.subject else u'[{0}][{1}] Log message'.format(
             cfg.sitename, log_level)
         msg = self.format(record)
         if app.cfg.email_tracebacks: