###
# mw - VCS-like nonsense for MediaWiki websites
-# Copyright (C) 2009 Ian Weller <ian@ianweller.org>
+# Copyright (C) 2010 Ian Weller <ian@ianweller.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
pagedata = json.loads(pagedata_raw)
rvid = int(rv['revid'])
pagedata[rvid] = {
- 'user': rv['user'], 'timestamp': rv['timestamp'],
- 'content': rv['*'],
+ 'user': rv['user'], 'timestamp': rv['timestamp']
}
+ if '*' in rv.keys():
+ pagedata[rvid]['content'] = rv['*']
fd.seek(0)
fd.write(json.dumps(pagedata))
fd.truncate()