Subversion Repositories SmartDukaan

Rev

Rev 71 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 71 Rev 78
Line 1... Line 1...
1
def getscore(struct):
1
def getscore(struct):
-
 
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
            
2
    return 7
22
    return score