Revision: 5578 Author: nicdumz Date: 2008-06-15 16:13:25 +0000 (Sun, 15 Jun 2008)
Log Message: ----------- Fixing bug #1994441 [-prefixindex page generator strips everything before ":"] : Removing duplicate namespace handling
Modified Paths: -------------- trunk/pywikipedia/pagegenerators.py
Modified: trunk/pywikipedia/pagegenerators.py =================================================================== --- trunk/pywikipedia/pagegenerators.py 2008-06-15 15:57:01 UTC (rev 5577) +++ trunk/pywikipedia/pagegenerators.py 2008-06-15 16:13:25 UTC (rev 5578) @@ -930,14 +930,7 @@ namespace = None if not prefix: prefix = wikipedia.input(u'What page names are you looking for?') - colon = prefix.find(':') - if colon > 0: - namespace = wikipedia.getSite().getNamespaceIndex(prefix[0:colon]) - # If the text before the colon is a valid namespace that - # that is not the main namespace, use the remainder. - if namespace: - prefix = prefix[colon+1:] - gen = PrefixingPageGenerator(prefix = prefix, namespace = namespace) + gen = PrefixingPageGenerator(prefix = prefix) elif arg.startswith('-newimages'): limit = arg[11:] or wikipedia.input(u'How many images do you want to load?') gen = NewimagesPageGenerator(number = int(limit))