Changeset 41 for protocols

Show
Ignore:
Timestamp:
07/17/06 15:48:46 (2 years ago)
Author:
ploum
Message:

#32 "Assigned to" field doesn't work
#41 Comments not entirely displayed
#46 open bookmark with middle click

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • protocols/protocol_launchpadweb.py

    r40 r41  
    1111 
    1212baseurl = "https://staging.launchpad.net/" 
     13#baseurl = "https://launchpad.net/" 
    1314 
    1415class protocol: 
     
    6667                        status = tbody[1].contents[0] 
    6768                        importance = tbody[2].contents[0] 
    68                         #need to prettify assigned 
    69                         #assigned = tbody[3].a.contents[2] 
    70                         assigned = "Assigned to..." 
     69                        string_tmp = tbody[3].a 
     70                        # Here we look if the bug is assigned to someone or not 
     71                        if string_tmp != None : 
     72                                assigned = string_tmp.contents[2].strip() 
     73                        else : 
     74                                #Assigned to nobody 
     75                                assigned = "Nobody yet" 
    7176                        #need to prettify content 
    7277                        content='' 
     
    8792                        zebug.setImportance(importance) 
    8893                        zebug.setDescription(content) 
     94                        zebug.setAssignee(assigned) 
    8995 
    9096                        array_com = soup.findAll('div', recursive=0)[1].findAll('div','boardComment') 
     
    98104                                com_counter += 1 
    99105                                content="" 
     106                                phrase = '' 
    100107                                for z in body : 
    101                                         phrase = z.contents[0].string 
     108                                        for ligne in z.contents : 
     109                                                if ligne.string != None : 
     110                                                        phrase += ligne.string 
     111                                        #phrase = z.contents[0].string 
    102112                                        new_phrase = phrase.strip().replace(" "," ") 
    103                                         content = "%s\n%s" %(content,new_phrase) 
     113                                        new_phrase2 = new_phrase.strip().replace(">",">") 
     114                                        content = "%s\n%s" %(content,new_phrase2) 
    104115                                newcom = comment(com_counter,content,poster,title,"00/00/00") 
    105116                                zebug.addComment(newcom)