summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Clatworthy <ian.clatworthy@canonical.com>2009-08-29 15:28:33 +1000
committerIan Clatworthy <ian.clatworthy@canonical.com>2009-08-29 15:28:33 +1000
commitb4bf1987ebe44067012ffb0a0748a1f782dba38c (patch)
treebbe058c5392c52f6e3000b6919933b0062b3d745
parent83d8431990c9d97e5c0ac299de7dc1853071f0be (diff)
downloadpython-fastimport-b4bf1987ebe44067012ffb0a0748a1f782dba38c.tar.gz
fix warning messages on non-utf8 names & emails
-rw-r--r--parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser.py b/parser.py
index 6d42862..be06ca9 100644
--- 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()