Subversion Repositories SmartDukaan

Rev

Rev 323 | 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")
        
        # GPS Type : Integrated GPS-4, Bluetooth GPS-2
        if features.has_key("GPS type") :
           gps_type = features.get("GPS type")
           
           if "Integrated GPS" in gps_type :
                score += 5
                
           if "A-GPS" in gps_type :
                score += 5
         
    return score