Misc: Update @version to use new display format of dates in Github API.

This commit is contained in:
Valentin Lorentz 2012-11-05 15:44:22 +00:00
parent 72b1d4f3de
commit 992de0962b
1 changed files with 2 additions and 4 deletions

View File

@ -299,10 +299,8 @@ class Misc(callbacks.Plugin):
data = json.loads(utils.web.getUrl(newestUrl % branch)
.decode('utf8'))
version = data['commit']['committer']['date']
# Strip the last ':':
version = ''.join(version.rsplit(':', 1))
# Replace the last '-' by '+':
version = '+'.join(version.rsplit('-', 1))
# Strip the last 'Z':
version = ''.join(version.rsplit('Z', 1))
versions[branch] = version.encode('utf-8')
newest = _('The newest versions available online are %s.') % \
', '.join([_('%s (in %s)') % (y,x)