[Pywikipedia-l] SVN: [4929] trunk/pywikipedia/category.py
wikipedian at svn.wikimedia.org
wikipedian at svn.wikimedia.org
Thu Jan 24 15:09:02 UTC 2008
Revision: 4929
Author: wikipedian
Date: 2008-01-24 15:09:02 +0000 (Thu, 24 Jan 2008)
Log Message:
-----------
applied patch [ 1878596 ] category.py handle wikipedia.NoPage by AndreasJS
Modified Paths:
--------------
trunk/pywikipedia/category.py
Modified: trunk/pywikipedia/category.py
===================================================================
--- trunk/pywikipedia/category.py 2008-01-24 15:06:45 UTC (rev 4928)
+++ trunk/pywikipedia/category.py 2008-01-24 15:09:02 UTC (rev 4929)
@@ -327,7 +327,7 @@
if answer == 'y' or answer == 'a':
try:
- cats = page.categories()
+ text = page.get()
except wikipedia.NoPage:
wikipedia.output(u"%s doesn't exist yet. Ignoring." % (page.title()))
pass
@@ -335,6 +335,10 @@
redirTarget = wikipedia.Page(site,arg.args[0])
wikipedia.output(u"WARNING: %s is redirect to %s. Ignoring." % (page.title(), redirTarget.title()))
else:
+ cats = page.categories()
+ # Show the title of the page we're working on.
+ # Highlight the title in purple.
+ wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title())
wikipedia.output(u"Current categories:")
for cat in cats:
wikipedia.output(u"* %s" % cat.title())
More information about the Pywikipedia-l
mailing list