http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10181
Revision: 10181 Author: xqt Date: 2012-05-05 09:39:02 +0000 (Sat, 05 May 2012) Log Message: ----------- update from trunk r10178
Modified Paths: -------------- branches/rewrite/scripts/version.py
Modified: branches/rewrite/scripts/version.py =================================================================== --- branches/rewrite/scripts/version.py 2012-05-05 09:37:09 UTC (rev 10180) +++ branches/rewrite/scripts/version.py 2012-05-05 09:39:02 UTC (rev 10181) @@ -65,16 +65,16 @@ cur.execute( '''select local_relpath, repos_path, revision, changed_date from nodes order by revision desc, changed_date desc''') name, tag, rev, date = cur.fetchone() con.close() - tag = tag[:len(tag) - len(name)] + tag = tag[:-len(name)] date = time.gmtime(date/1000000) else: - for i in range(3): + for i in xrange(3): entries.readline() tag = entries.readline().strip() t = tag.split('://') t[1] = t[1].replace('svn.wikimedia.org/svnroot/pywikipedia/', '') tag = '[%s] %s' % (t[0], t[1]) - for i in range(4): + for i in xrange(4): entries.readline() date = time.strptime(entries.readline()[:19],'%Y-%m-%dT%H:%M:%S') rev = entries.readline()[:-1]
pywikipedia-svn@lists.wikimedia.org