def pre_process(self, req, params):
post_list = []<EOL>for ext in self.extensions:<EOL><INDENT>if ext.isgenerator:<EOL><INDENT>gen = ext(req, **params)<EOL>try:<EOL><INDENT>result = gen.next()<EOL>if result:<EOL><INDENT>return self.wrap(req, result), post_list<EOL><DEDENT><DEDENT>except StopIteration:<EOL><INDENT>continue<EOL><DEDENT>post_list.insert(<NUM_LIT:0>, gen)<EOL><DEDENT>else:<EOL><INDENT>post_list.insert(<NUM_LIT:0>, ext)<EOL><DEDENT><DEDENT>return None, post_list<EOL>
Pre-process the extensions for the action.  If any
pre-processing extension yields a value which tests as True,
extension pre-processing aborts and that value is returned;
otherwise, None is returned.  Return value is always a tuple,
with the second element of the tuple being a list to feed to
post_process().