Subversion Repositories SmartDukaan

Rev

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

Rev 4041 Rev 4042
Line 15... Line 15...
15
            
15
            
16
            if hard_disk_drive_slide.has_key('features'):
16
            if hard_disk_drive_slide.has_key('features'):
17
                features = hard_disk_drive_slide.get('features')
17
                features = hard_disk_drive_slide.get('features')
18
                
18
                
19
                if features.has_key('Storage capacity'):
19
                if features.has_key('Storage capacity'):
20
                    storage_capacity = int(features.get('Storage capacity')[0])
20
                    storage_capacity = float(features.get('Storage capacity')[0])
21
 
-
 
-
 
21
                    
22
                    if storage_capacity > 1024 and storage_capacity < (1024 * 1024):
22
                    if storage_capacity > 1024.0 and storage_capacity < (1024.0 * 1024.0):
23
                        storage_capacity = storage_capacity / 1024      #MBs to GBs
23
                        storage_capacity = storage_capacity / 1024.0      #MBs to GBs
24
                    elif storage_capacity > 1024 * 1024:
24
                    elif storage_capacity > 1024.0 * 1024.0:
25
                        storage_capacity = storage_capacity / (1024 * 1024)      #KBs to GBs
25
                        storage_capacity = storage_capacity / (1024.0 * 1024.0)      #KBs to GBs
26
                    
26
                    
27
                    if storage_capacity <= 250.0:
27
                    if storage_capacity <= 250.0:
28
                        storage_capacity_score = 4.0
28
                        storage_capacity_score = 4.0
29
                    elif storage_capacity > 640.0:
29
                    elif storage_capacity > 640.0:
30
                        storage_capacity_score = 10.0
30
                        storage_capacity_score = 10.0