changeset 1079:029754c52b11

Changed file format of meta file (\r\n line endings). Enhanced docstrings.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Fri, 28 Jul 2006 16:01:19 +0200
parents e015da143653
children f8ba3b0ca9f4
files MoinMoin/wikiutil.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Wed Jul 26 11:22:19 2006 +0200
+++ b/MoinMoin/wikiutil.py	Fri Jul 28 16:01:19 2006 +0200
@@ -443,7 +443,7 @@
             if key in INTEGER_METAS:
                 value = str(value)
             meta.append("%s: %s" % (key, value))
-        meta = '\n'.join(meta)
+        meta = '\r\n'.join(meta)
         # XXX what does happen if the metafile is being read or written to in another process?
         metafile = codecs.open(self.metafilename, "w", "utf-8")
         metafile.write(meta)
@@ -452,7 +452,7 @@
         self.dirty = False
 
     def sync(self, mtime_usecs=None):
-        """ sync the in-memory dict to disk (if dirty) """
+        """ sync the in-memory dict to the persistent store (if dirty) """
         if self.dirty:
             if not mtime_usecs is None:
                 self.__setitem__('mtime', str(mtime_usecs))
@@ -469,6 +469,8 @@
                 raise
 
     def __setitem__(self, key, value):
+        """ Sets a dictionary entry. You actually have to call sync to write it
+            to the persistent store. """
         try:
             oldvalue = dict.__getitem__(self, key)
         except KeyError: