r10160 pywikipedia - Code Review archive

Repository:pywikipedia
Revision:r10159‎ | r10160 | r10161 >
Date:14:12, 30 April 2012
Author:xqt
Status:ok (Comments)
Tags:
Comment:
fix for directory tag
Modified paths:
  • /trunk/pywikipedia/version.py (modified) (history)

Diff [purge]

Index: trunk/pywikipedia/version.py
@@ -64,7 +64,7 @@
6565 cur.execute( '''select local_relpath, repos_path, revision, changed_date from nodes order by revision desc, changed_date desc''')
6666 name, tag, rev, date = cur.fetchone()
6767 con.close()
68 - tag = tag.rstrip(name)
 68+ tag = tag[:len(tag) - len(name)]
6969 date = time.gmtime(date/1000000)
7070 else:
7171 for i in range(3):

Follow-up revisions

RevisionCommit summaryAuthorDate
r10161update from trunk r9913, r10160xqt14:17, 30 April 2012
r10178code optimations: use xrange iterator intead of range list; s[:-x] instead of...xqt09:27, 5 May 2012

Comments

#Comment by Valhallasw (talk | contribs)   21:37, 30 April 2012

Why not tag[:-len(name)]?

Status & tagging log