Index: trunk/pywikipedia/version.py |
— | — | @@ -64,16 +64,16 @@ |
65 | 65 | cur.execute( '''select local_relpath, repos_path, revision, changed_date from nodes order by revision desc, changed_date desc''') |
66 | 66 | name, tag, rev, date = cur.fetchone() |
67 | 67 | con.close() |
68 | | - tag = tag[:len(tag) - len(name)] |
| 68 | + tag = tag[:-len(name)] |
69 | 69 | date = time.gmtime(date/1000000) |
70 | 70 | else: |
71 | | - for i in range(3): |
| 71 | + for i in xrange(3): |
72 | 72 | entries.readline() |
73 | 73 | tag = entries.readline().strip() |
74 | 74 | t = tag.split('://') |
75 | 75 | t[1] = t[1].replace('svn.wikimedia.org/svnroot/pywikipedia/', '') |
76 | 76 | tag = '[%s] %s' % (t[0], t[1]) |
77 | | - for i in range(4): |
| 77 | + for i in xrange(4): |
78 | 78 | entries.readline() |
79 | 79 | date = time.strptime(entries.readline()[:19],'%Y-%m-%dT%H:%M:%S') |
80 | 80 | rev = entries.readline()[:-1] |