view MoinMoin/action/ @ 3175:2a3a6cb34e45

pylint findings: fix some harmless stuff
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 03 Mar 2008 02:02:55 +0100
parents ba14d391c2ba
children b5cc2b8dc753
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - revert a page to a previous revision

    @copyright: 2000-2004 Juergen Hermann <>,
                2006 MoinMoin:ThomasWaldmann
    @license: GNU GPL, see COPYING for details.

def execute(pagename, request):
    """ restore another revision of a page as a new current revision """
    from MoinMoin.PageEditor import PageEditor
    rev = request.rev
    pg = PageEditor(request, pagename)

        msg = pg.revertPage(rev)
    except PageEditor.RevertError, error:
        msg = unicode(error)

    request.theme.add_msg(msg, "dialog")