Revision: 5650 Author: jayvdb Date: 2008-06-29 04:09:49 +0000 (Sun, 29 Jun 2008)
Log Message: ----------- Improved handling of command line parameter -pages
Modified Paths: -------------- trunk/pywikipedia/djvutext.py
Modified: trunk/pywikipedia/djvutext.py =================================================================== --- trunk/pywikipedia/djvutext.py 2008-06-29 03:44:13 UTC (rev 5649) +++ trunk/pywikipedia/djvutext.py 2008-06-29 04:09:49 UTC (rev 5650) @@ -69,14 +69,15 @@ end = self.NoOfImages()
if self.pages: - if self.pages.index('-'): - pos = self.pages.index('-') + pos = self.pages.find('-') + if pos != -1: start = self.pages[:pos] if pos < len(self.pages)-1: end = self.pages[pos+1:] end = int(end) else: start = self.pages + end = int(start) i = int(start) print "processing pages %d-%d" % (i, end) while i <= end: