Revision: 8397 Author: xqt Date: 2010-08-11 20:16:09 +0000 (Wed, 11 Aug 2010)
Log Message: ----------- no_hostname is not defined - fix for bug #3041406
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-08-10 19:13:44 UTC (rev 8396) +++ trunk/pywikipedia/wikipedia.py 2010-08-11 20:16:09 UTC (rev 8397) @@ -5096,10 +5096,8 @@ text = unicode(text, charset, errors = 'strict') except UnicodeDecodeError, e: print e - 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)) + 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')