Attachment 'Page.patch'

Download

   1 diff -r 0dd02729b3b5 MoinMoin/Page.py
   2 --- a/MoinMoin/Page.py	Sat Jan 09 02:40:08 2010 +0100
   3 +++ b/MoinMoin/Page.py	Sat Jan 30 18:22:29 2010 +0100
   4 @@ -34,7 +34,7 @@
   5      @license: GNU GPL, see COPYING for details.
   6  """
   7  
   8 -import os, re, codecs
   9 +import errno, os, re, codecs
  10  
  11  from MoinMoin import log
  12  logging = log.getLogger(__name__)
  13 @@ -211,7 +211,6 @@
  14              try:
  15                  f = codecs.open(self._text_filename(), 'rb', config.charset)
  16              except IOError, er:
  17 -                import errno
  18                  if er.errno == errno.ENOENT:
  19                      # just doesn't exist, return empty text (note that we
  20                      # never store empty pages, so this is detectable and also
  21 @@ -679,7 +678,6 @@
  22          try:
  23              return os.path.getsize(self._text_filename(rev=rev))
  24          except EnvironmentError, e:
  25 -            import errno
  26              if e.errno == errno.ENOENT:
  27                  return 0
  28              raise
  29 @@ -1021,7 +1019,15 @@
  30              eventlog.EventLog(request).add(request, 'VIEWPAGE', {'pagename': self.page_name})
  31  
  32          # load the text
  33 -        body = self.data
  34 +        try:
  35 +            body = self.data
  36 +        except IOError, er:
  37 +            if er.errno == errno.ENAMETOOLONG:
  38 +                request.write(_('Pagename: "%s" too long')  % self.page_name)
  39 +                return
  40 +            else:
  41 +                raise
  42 +
  43          pi = self.pi
  44  
  45          if 'redirect' in pi and not (

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] (2010-01-30 17:24:51, 1.4 KB) [[attachment:Page.patch]]
 All files | Selected Files: delete move to page copy to page

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