Logo Search packages:      
Sourcecode: mbot version File versions  Download package

def NewsHandler::NewsHandler::getsite (   self,
  e_mail 
) [inherited]

Get the site information 

Definition at line 33 of file NewsHandler.py.

00033                              :
        """ Get the site information """
        
      import rfc822

        self.log.notice("[NewsHandler]: getsite")
      (name, sender) = rfc822.parseaddr(e_mail)
        self.log.debug("[NewsHandler]: getsite -> sender='%s'" % sender)
        (user, dom)    = sender.split('@')
        self.log.debug("[NewsHandler]: getsite -> dom='%s'" % dom)

        try:
           dico_site = eval(self.site)
           site      = dico_site[dom]
        except KeyError, SyntaxError:
           site = 'test'

        self.log.debug("[NewsHandler]: getsite -> site='%s'" % site)
        return site
        
    def add_news(self, text, img_id=0):


Generated by  Doxygen 1.6.0   Back to index