fix warning messages on non-utf8 names & emails
authorIan Clatworthy <ian.clatworthy@canonical.com>
Sat, 29 Aug 2009 05:28:33 +0000 (15:28 +1000)
committerIan Clatworthy <ian.clatworthy@canonical.com>
Sat, 29 Aug 2009 05:28:33 +0000 (15:28 +1000)
parser.py

index 6d428628c6812ade7200e9bc695dd5f0dd0dbba2..be06ca9c9e7152627b2696ba10780cb871a504fe 100644 (file)
--- a/parser.py
+++ b/parser.py
@@ -270,7 +270,7 @@ class ImportParser(LineBasedParser):
         # We auto-detect the date format when a date is first encountered
         self.date_parser = None
 
-    def _warning(self, msg):
+    def warning(self, msg):
         sys.stderr.write("warning line %d: %s\n" % (self.lineno, msg))
 
     def iter_commands(self):
@@ -353,7 +353,7 @@ class ImportParser(LineBasedParser):
         try:
             message = message.decode('utf_8')
         except UnicodeDecodeError:
-            self._warning(
+            self.warning(
                 "commit message not in utf8 - replacing unknown characters")
             message = message.decode('utf_8', 'replace')
         from_ = self._get_from()