Changeset 2839

Show
Ignore:
Timestamp:
11/29/07 15:54:35 (1 year ago)
Author:
coling
Message:

Create a fake req object that should allow wiki formatting etc. to work... usually. ;)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • clientsplugin/0.11/cron/send-client-email

    r2756 r2839  
    155155 
    156156 
     157class SendClientFakeReq: 
     158  def __init__(self): 
     159    class SendClientFakeHref: 
     160      def __call__(self, *args, **keywords): 
     161        return '' 
     162      def wiki(self, *args, **keywords): 
     163        return '' 
     164    self.href = SendClientFakeHref() 
     165   
     166  def perm(self, *args, **keywords): 
     167    return [] 
     168 
     169    return SendClientFakeWiki() 
     170 
    157171class SendClientEmails: 
    158172 
     
    165179        locale.setlocale(locale.LC_ALL, '') 
    166180        self.env = open_environment(options.envpath) 
    167         self.req = None 
     181        self.req = SendClientFakeReq() 
    168182        from clients.processor import extract_client_text 
    169183