Subversion Repositories SmartDukaan

Rev

Rev 1915 | 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") :
4193 mandeep.dh 10
            score = 7.0
11
 
1915 rajveer 12
            protocols = features.get("Protocols")
4193 mandeep.dh 13
 
1915 rajveer 14
            if "IMAP" in protocols :
15
                score = 10.0
4193 mandeep.dh 16
            if "IMAP4" in protocols :
17
                score = 10.0
18
 
78 naveen 19
    return score