Subversion Repositories SmartDukaan

Rev

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

def getscore(struct):
    
    score = 0.0
    
    if struct.has_key("features") :
        features = struct.get("features")
    
        # Protocols : Mail for Exchange-3, POP3-1, SMTP-1, IMAP-1, IMAP4-1
        if features.has_key("Markup languages") :
            markup_languages = features.get("Markup languages")
            
            if "JavaScript" in markup_languages :
                score = 10.0
            else:
                score = 8.0
                
    return score