Subversion Repositories SmartDukaan

Rev

Rev 323 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
78 naveen 1
def getscore(struct) :
2
 
1915 rajveer 3
    score = 0.0
78 naveen 4
 
5
    if struct.has_key("features") :
6
        features = struct.get("features")
7
 
8
        # Protocols : Mail for Exchange-3, POP3-1, SMTP-1, IMAP-1, IMAP4-1
9
        if features.has_key("Protocols") :
1915 rajveer 10
            protocols = features.get("Protocols")
78 naveen 11
 
1915 rajveer 12
            if "IMAP" in protocols :
13
                score = 10.0
14
            else:
15
                score = 7.0
78 naveen 16
 
17
    return score