From 8411723b652b02aa69fdf09e495d8aa9706908d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 22 Sep 2012 20:06:47 +0200 Subject: [PATCH] avoid key error --- moin2doku.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moin2doku.py b/moin2doku.py index a40a7ec..3ab7887 100755 --- a/moin2doku.py +++ b/moin2doku.py @@ -274,7 +274,8 @@ else: # insert frontpage, # so that MoinMoin frontpage gets saved as DokuWiki frontpage based on their configs frontpage = wikiutil.getFrontPage(request) - del pages[frontpage.page_name] + if pages.has_key(frontpage.page_name): + del pages[frontpage.page_name] pages[dw.getId()] = frontpage for pagename, page in pages.items():