Changeset 69 for protocols

Show
Ignore:
Timestamp:
03/28/07 08:38:40 (22 months ago)
Author:
ploum
Message:

Only display the comment form if you can actually post one.
It fixes #61 for now

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • protocols/protocol_launchpadstaging_web.py

    r68 r69  
    132132                        zebug.setDescription(content) 
    133133                        zebug.setAssignee(assigned) 
     134                        zebug.setCommentable(self.__isCommentable(nbr)) 
    134135 
    135136                        array_com = soup.findAll('div', recursive=0)[1].findAll('div','boardComment') 
     
    302303                else : 
    303304                        return False 
     305                         
     306        def __isCommentable(self,bugnbr) : 
     307                urlcom="%sbugs/%s" %(self.url(),bugnbr) 
     308                br = self.__login() 
     309                br.open(urlcom) 
     310                try : 
     311                        br.select_form(predicate=self.__isform_comment) 
     312                        return True 
     313                except : 
     314                        return False 
    304315 
    305316        def postComment(self,bugnbr,title,comment) :