Revision: 6684 Author: cosoleto Date: 2009-04-23 10:04:43 +0000 (Thu, 23 Apr 2009)
Log Message: ----------- Removed unused variables, modules, and a repeated count() call.
Modified Paths: -------------- trunk/pywikipedia/copyright.py
Modified: trunk/pywikipedia/copyright.py =================================================================== --- trunk/pywikipedia/copyright.py 2009-04-23 07:34:01 UTC (rev 6683) +++ trunk/pywikipedia/copyright.py 2009-04-23 10:04:43 UTC (rev 6684) @@ -83,8 +83,8 @@ #
from __future__ import generators -import sys, re, codecs, os, time, urllib, urllib2, httplib -import wikipedia, pagegenerators, catlib, config +import re, codecs, os, time, urllib, urllib2, httplib +import wikipedia, pagegenerators, config
__version__='$Id$'
@@ -331,7 +331,7 @@ data = page.get() except KeyboardInterrupt: raise - except wikipedia.IsRedirectPage, arg: + except wikipedia.IsRedirectPage: data = page.getRedirectTarget().get() except: error('Getting page failed') @@ -443,9 +443,9 @@
def economize_query(text): # Comma separated list - if text.count(', ') > 4: + c = text.count(', ') + if c > 4: l = len(text) - c = text.count(', ') r = 100 * float(c) / l
#if r >= 4 and r < 7: @@ -1112,7 +1112,6 @@ # Default number of pages for NewPages generator number = 60
- firstPageTitle = None # This factory is responsible for processing command line arguments # that are also used by other scripts and that determine on which pages # to work on.
pywikipedia-svn@lists.wikimedia.org