comparison MoinMoin/script/__init__.py @ 4257:29e81e73fe67

Replace request_cli with ScriptContext in MoinScript
author Florian Krupicka <florian.krupicka@googlemail.com>
date Thu, 31 Jul 2008 16:01:55 +0200
parents 0259bd2d0777
children d706f5d4f4ec
comparison
equal deleted inserted replaced
4256:c9483e402491 4257:29e81e73fe67
171 help="wiki page name [default: all pages]" 171 help="wiki page name [default: all pages]"
172 ) 172 )
173 173
174 def init_request(self): 174 def init_request(self):
175 """ create request """ 175 """ create request """
176 from MoinMoin.request import request_cli 176 from MoinMoin.web.contexts import ScriptContext
177 if self.options.wiki_url: 177 if self.options.wiki_url:
178 self.request = request_cli.Request(self.options.wiki_url, self.options.page) 178 self.request = ScriptContext(self.options.wiki_url, self.options.page)
179 else: 179 else:
180 self.request = request_cli.Request(pagename=self.options.page) 180 self.request = ScriptContext(pagename=self.options.page)
181 181
182 def mainloop(self): 182 def mainloop(self):
183 # Insert config dir or the current directory to the start of the path. 183 # Insert config dir or the current directory to the start of the path.
184 config_dir = self.options.config_dir 184 config_dir = self.options.config_dir
185 if config_dir: 185 if config_dir: