Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
71 naveen 1
def getscore(struct):
78 naveen 2
 
3
    score = 0
4
 
5
    if struct.has_key("features") :
6
        features = struct.get("features")
7
 
8
        # GPS Type : Integrated GPS-4, Bluetooth GPS-2
9
        if features.has_key("GPS Type") :
10
           gpstype = features.get("GPS Type")
11
 
12
           if "Integrated GPS" in gpstype :
13
                score += 4
14
 
15
           if "Bluetooth GPS" in gpstype :
16
                score += 2
17
 
18
        # A-GPS : 2, 0
19
        if features.has_key("A-GPS") :
20
            score += 2
21
 
22
    return score