X-Git-Url: https://projects.mako.cc/source/mw/blobdiff_plain/2c860f8d2f73c9d7322953b40b28927cef0187b9..f5846ccc4228fab747eebc991ea97fd3238aea39:/src/mw/metadir.py diff --git a/src/mw/metadir.py b/src/mw/metadir.py index e09c840..f7f2fba 100644 --- a/src/mw/metadir.py +++ b/src/mw/metadir.py @@ -1,6 +1,6 @@ ### # mw - VCS-like nonsense for MediaWiki websites -# Copyright (C) 2009 Ian Weller +# Copyright (C) 2010 Ian Weller # # 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 @@ -98,9 +98,10 @@ class Metadir(object): 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()