Attachment '_conv160.py.patch'

Download

   1 diff -r dfb257df7fe3 MoinMoin/script/migration/_conv160.py
   2 --- a/MoinMoin/script/migration/_conv160.py	Mon Feb 04 14:35:21 2008 +0100
   3 +++ b/MoinMoin/script/migration/_conv160.py	Thu Feb 07 19:07:46 2008 +0100
   4 @@ -131,17 +131,23 @@ class EditLog:
   5          """ read complete edit-log from disk """
   6          data = {}
   7          try:
   8 +            lineno = 0
   9              f = file(self.fname, 'r')
  10              for line in f:
  11 +                lineno += 1
  12                  line = line.replace('\r', '').replace('\n', '')
  13                  if not line.strip(): # skip empty lines
  14                      continue
  15                  fields = line.split('\t') + [''] * 9
  16                  timestamp, rev, action, pagename, ip, hostname, userid, extra, comment = fields[:9]
  17 -                timestamp = int(timestamp)
  18 -                rev = int(rev)
  19 -                pagename = wikiutil.unquoteWikiname(pagename)
  20 -                data[(timestamp, rev, pagename)] = (timestamp, rev, action, pagename, ip, hostname, userid, extra, comment)
  21 +                try:
  22 +                    timestamp = int(timestamp)
  23 +                    rev = int(rev)
  24 +                    pagename = wikiutil.unquoteWikiname(pagename)
  25 +                    data[(timestamp, rev, pagename)] = (timestamp, rev, action, pagename, ip, hostname, userid, extra, comment)
  26 +                except ValueError, err:
  27 +                    # corrupt event log line, log error and skip it
  28 +                    print "Error: invalid edit log (%s) line %d, err: %s, SKIPPING THIS LINE!" % (self.fname, lineno, str(err))
  29              f.close()
  30          except IOError, err:
  31              # no edit-log

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2008-02-07 18:11:19, 1.6 KB) [[attachment:_conv160.py.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.