Revision: 5574 Author: filnik Date: 2008-06-15 15:31:22 +0000 (Sun, 15 Jun 2008)
Log Message: ----------- bugfix, geturl error not updated
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-06-15 15:23:41 UTC (rev 5573) +++ trunk/pywikipedia/wikipedia.py 2008-06-15 15:31:22 UTC (rev 5574) @@ -4344,7 +4344,10 @@ text = unicode(text, charset, errors = 'strict') except UnicodeDecodeError, e: print e - output(u'ERROR: Invalid characters found on %s://%s%s, replaced by \ufffd.' % (self.protocol(), self.hostname(), path)) + if no_hostname: + output(u'ERROR: Invalid characters found on %s, replaced by \ufffd.' % path) + else: + output(u'ERROR: Invalid characters found on %s://%s%s, replaced by \ufffd.' % (self.protocol(), self.hostname(), path)) # We use error='replace' in case of bad encoding. text = unicode(text, charset, errors = 'replace')