http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9541
Revision: 9541 Author: xqt Date: 2011-09-24 15:49:39 +0000 (Sat, 24 Sep 2011) Log Message: ----------- do not replace section if it is None; fix for bug #3412831 introduced with r9490
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2011-09-24 14:24:29 UTC (rev 9540) +++ trunk/pywikipedia/wikipedia.py 2011-09-24 15:49:39 UTC (rev 9541) @@ -510,7 +510,7 @@ If no section is present, return None. """ section = self._section - if underscore: + if section and underscore: section = section.replace(' ', '_') return section