comparison MoinMoin/action/SyncPages.py @ 971:d24f2b1d606a

Refactoring, fixed Fault codes, fixed return format of the getdiff method.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Wed, 12 Jul 2006 00:14:55 +0200
parents f29c09448353
children a442ed63b165
comparison
equal deleted inserted replaced
970:f29c09448353 971:d24f2b1d606a
27 self.xmlrpc_url = self.wiki_url + "?action=xmlrpc2" 27 self.xmlrpc_url = self.wiki_url + "?action=xmlrpc2"
28 28
29 def __repr__(self): 29 def __repr__(self):
30 return "<RemoteWiki wiki_url=%r valid=%r>" % (self.valid, self.wiki_url) 30 return "<RemoteWiki wiki_url=%r valid=%r>" % (self.valid, self.wiki_url)
31 31
32 class PackagePages: 32 class ActionClass:
33 def __init__(self, pagename, request): 33 def __init__(self, pagename, request):
34 self.request = request 34 self.request = request
35 self.pagename = pagename 35 self.pagename = pagename
36 self.page = Page(request, pagename) 36 self.page = Page(request, pagename)
37 37
70 return self.page.send_page(self.request, msg=u'<p class="error">%s</p>\n' % (e.args[0], )) 70 return self.page.send_page(self.request, msg=u'<p class="error">%s</p>\n' % (e.args[0], ))
71 71
72 raise ActionStatus(_("Syncronisation finished.")) 72 raise ActionStatus(_("Syncronisation finished."))
73 73
74 def execute(pagename, request): 74 def execute(pagename, request):
75 """ Glue code for actions """ 75 ActionClass(pagename, request).render()
76 PackagePages(pagename, request).render()