Subversion Repositories SmartDukaan

Rev

Rev 1915 | Rev 1979 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1915 Rev 1936
Line 17... Line 17...
17
                security_score = 10
17
                security_score = 10
18
            else:
18
            else:
19
                security_score = 2*features.get("Security") 
19
                security_score = 2*features.get("Security") 
20
 
20
 
21
        if features.has_key("OS") :
21
        if features.has_key("OS") :
-
 
22
           os = features.get("OS")
-
 
23
           os = os[0]
-
 
24
           if os.find("Android") > -1 :
-
 
25
               if os.find("1.5") > -1 :
-
 
26
                   os_score = 4
-
 
27
               if os.find("1.6") > -1 :
-
 
28
                   os_score = 6
-
 
29
               if os.find("2.1") > -1 :
-
 
30
                   os_score = 7
-
 
31
               if os.find("2.2") > -1 :
-
 
32
                   os_score = 8
-
 
33
               if os.find("2.3") > -1 :
-
 
34
                   os_score = 9
-
 
35
            
-
 
36
           if os.find("BlackBerry") > -1 :
-
 
37
               if os.find("5.0") > -1 :
-
 
38
                   os_score = 6
-
 
39
               if os.find("6.0") > -1 :
-
 
40
                   os_score = 8
-
 
41
 
-
 
42
           if os.find("Brew Mobile Platform") > -1 :
-
 
43
               os_score = 5
-
 
44
           
-
 
45
           if os.find("Maemo 5") > -1 :
-
 
46
               os_score = 6
-
 
47
 
-
 
48
           if os.find("Bada") > -1 :
-
 
49
               os_score = 6
-
 
50
 
-
 
51
           if os.find("Microsoft Windows Mobile 6.5.3 Professional") > -1 :
-
 
52
               os_score = 6
-
 
53
 
-
 
54
           if os.find("Symbian") > -1 :
-
 
55
               if os.find("40") > -1 :
-
 
56
                   os_score = 5
-
 
57
               if os.find("60") > -1 :
-
 
58
                   os_score = 7
-
 
59
               if os.find("^3") > -1 :
-
 
60
                   os_score = 8
-
 
61
           if os_score == 0:
22
           os_score = 7
62
               os_score = 3
-
 
63
 
-
 
64
            
-
 
65
               
23
        
66
        
24
        score = (20*java_score + 20*security_score + 60*os_score)/100
67
        score = (20*java_score + 20*security_score + 60*os_score)/100
25
    return score
68
    return score