changeset 1904:82667e81b928

Fix crash in AttachFile when called by xmlrpc and request.page is None
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 22 Mar 2007 07:23:36 +0100
parents 0a6764ab0c16
children 60a6dd88624a
files MoinMoin/action/AttachFile.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Mon Mar 19 22:13:21 2007 +0100
+++ b/MoinMoin/action/AttachFile.py	Thu Mar 22 07:23:36 2007 +0100
@@ -65,7 +65,7 @@
             os.makedirs(attach_dir)
     else:
         # send file via CGI, from page storage area
-        if pagename == request.page.page_name:
+        if request.page and pagename == request.page.page_name:
             page  = request.page # reusing existing page obj is faster
         else:
             page = Page(request, pagename)