jhbuild r2281 - in trunk: . jhbuild/buildbot



Author: fpeters
Date: Mon Aug 18 10:08:34 2008
New Revision: 2281
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2281&view=rev

Log:
* jhbuild/buildbot/changes.py: fixed change notification on bad file
and unknown encoding.



Modified:
   trunk/ChangeLog
   trunk/jhbuild/buildbot/changes.py

Modified: trunk/jhbuild/buildbot/changes.py
==============================================================================
--- trunk/jhbuild/buildbot/changes.py	(original)
+++ trunk/jhbuild/buildbot/changes.py	Mon Aug 18 10:08:34 2008
@@ -31,6 +31,10 @@
     name = "Gnome svn-commits-list"
 
     def parse(self, m, prefix=None):
+        if m is None:
+            # not a mail at all
+            return None
+
         # From is svnuser svn gnome org
         name, domain = m["from"].split("@")
 
@@ -75,7 +79,7 @@
                     if l[:-1] not in ("Added:", "Modified:", "Removed:"):
                         files.append(l[3:-1])
 
-        comments = unicode(comments, m.get_content_charset())
+        comments = unicode(comments, m.get_content_charset() or 'ascii', 'ignore')
         c = changes.Change(name, files, comments, isdir, revision=revision, links=links, when=when)
         c.project = project # custom attribute
         return c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]