changeset 1565:6eae21f5f3f9

fix UnboundLocalError (port to 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Sep 2006 20:41:08 +0200
parents 3519979c1590
children bc235abefd24
files MoinMoin/PageEditor.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Mon Sep 18 20:40:15 2006 +0200
+++ b/MoinMoin/PageEditor.py	Mon Sep 18 20:41:08 2006 +0200
@@ -965,13 +965,14 @@
             # check if we already saved that page
             other = False
             pagelog = self.getPagePath('edit-log', use_underlay=0, isfile=1)
+            next_line = None
             for line in editlog.EditLog(self.request, pagelog).reverse():
                 if int(line.rev)==int(rev):
                     break
                 if not line.is_from_current_user(self.request):
                     other = True
                 next_line = line
-            if next_line.is_from_current_user(self.request):
+            if next_line and next_line.is_from_current_user(self.request):
                 saved_page = Page(self.request, self.page_name,
                                   rev=int(next_line.rev))
                 if newtext==saved_page.get_raw_body():