Menu

#633 Site class is missing the documented "messages" method

closed-fixed
nobody
None
5
2008-02-19
2008-02-19
No

Strange that no one noticed that. I was using Site.messages field without noticing that I should expect a method. Until the recent rewrite, it was working properly, but as of now, Site.messages is not initialized properly and accessing it is hazardous. I'd like messages() implemented, please :)

Thanks !

Discussion

  • NicDumZ — Nicolas Dumazet

    Logged In: YES
    user_id=1963242
    Originator: YES

    _getEditPage is setting the Site.messages field, which is not accessed within the Site class :

    #Check for new messages
    if '<div class="usermessage">' in text:
    self.site().messages=True
    else:
    self.site().messages=False

    the _messages array should be used instead.

     
  • Rotem Liss

    Rotem Liss - 2008-02-19
    • status: open --> closed-fixed
     
  • Rotem Liss

    Rotem Liss - 2008-02-19

    Logged In: YES
    user_id=1327030
    Originator: NO

    Added method and removed duplicate code (noted in comment) in r5053.

     

Log in to post a comment.