(self, key)
return msg
Return a Message representation or raise a KeyError.
Return a Message representation or raise a KeyError.
Return a Message representation or raise a KeyError .
def get_message(self, key):
        """Return a Message representation or raise a KeyError."""
        subpath = self._lookup(key)
        with open(os.path.join(self._path, subpath), 'rb') as f:
            if self._factory:
                msg = self._factory(f)
            else:
                msg = MaildirMessage(f)
        subdir, name = os.path.split(subpath)
        msg.set_subdir(subdir)
        if self.colon in name:
            msg.set_info(name.split(self.colon)[-1])
        msg.set_date(os.path.getmtime(os.path.join(self._path, subpath)))
        return msg
def get_message ( self , key ) : subpath = self . _lookup ( key ) with open ( os . path . join ( self . _path , subpath ) , 'rb' ) as f : if self . _factory : msg = self . _factory ( f ) else : msg = MaildirMessage ( f ) subdir , name = os . path . split ( subpath ) msg . set_subdir ( subdir ) if self . colon in name : msg . set_info ( name . split ( self . colon ) [ - 1 ] ) msg . set_date ( os . path . getmtime ( os . path . join ( self . _path , subpath ) ) ) return msg