Subversion Repositories SmartDukaan

Rev

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

Rev 4040 Rev 4041
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(Decimal(features.get('Storage capacity')[0]))
20
                    storage_capacity = int(features.get('Storage capacity')[0])
21
 
21
 
22
                    if storage_capacity > 1024 and storage_capacity < (1024 * 1024):
22
                    if storage_capacity > 1024 and storage_capacity < (1024 * 1024):
23
                        storage_capacity = storage_capacity / 1024      #MBs to GBs
23
                        storage_capacity = storage_capacity / 1024      #MBs to GBs
24
                    elif storage_capacity > 1024 * 1024:
24
                    elif storage_capacity > 1024 * 1024:
25
                        storage_capacity = storage_capacity / (1024 * 1024)      #KBs to GBs
25
                        storage_capacity = storage_capacity / (1024 * 1024)      #KBs to GBs