Subversion Repositories SmartDukaan

Rev

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

Rev 2657 Rev 5173
Line 66... Line 66...
66
                        #print "bulletvalue=" + bulletvalue
66
                        #print "bulletvalue=" + bulletvalue
67
                        unit = expbullet.getUnit()
67
                        unit = expbullet.getUnit()
68
                        print "unit is" + `unit`
68
                        print "unit is" + `unit`
69
                        if unit is not None:
69
                        if unit is not None:
70
                            print "unit is not none"
70
                            print "unit is not none"
-
 
71
                            if unit.getShortForm() == "TB":
-
 
72
                                print "TB is" + `bulletvalue`
-
 
73
                                value = float(bulletvalue)
-
 
74
                                #if(bulletvalue.endswith('L')):
-
 
75
                                 #   bulletvalue=bulletvalue[0:len(bulletvalue)-2]
-
 
76
                                newvalue = value * 1024 * 1024 * 1024
-
 
77
                                print "KB is" + `newvalue`
-
 
78
                                bulletvalue = str(newvalue)
-
 
79
                                #convert to kb
71
                            if unit.getShortForm() == "GB":
80
                            if unit.getShortForm() == "GB":
72
                                print "GB is" + `bulletvalue`
81
                                print "GB is" + `bulletvalue`
73
                                value = float(bulletvalue)
82
                                value = float(bulletvalue)
74
                                #if(bulletvalue.endswith('L')):
83
                                #if(bulletvalue.endswith('L')):
75
                                 #   bulletvalue=bulletvalue[0:len(bulletvalue)-2]
84
                                 #   bulletvalue=bulletvalue[0:len(bulletvalue)-2]
Line 90... Line 99...
90
                        
99
                        
91
                featurestructs[featurelabel] = bulletsstruct
100
                featurestructs[featurelabel] = bulletsstruct
92
            else :
101
            else :
93
                # Set to empty list, this is to accomodate bullet-less features
102
                # Set to empty list, this is to accomodate bullet-less features
94
                featurestructs[featurelabel] = []
103
                featurestructs[featurelabel] = []
95
    
104
            freeFormStruct = []
-
 
105
            if expfeature.getFreeformContent() is not None:
-
 
106
                if expfeature.getFreeformContent().getFreeformTexts() is not None:
-
 
107
                    for freeformText in expfeature.getFreeformContent().getFreeformTexts():
-
 
108
                        freeFormStruct.append(freeformText)
-
 
109
                    if len(freeFormStruct) > 0:
-
 
110
                        if(len(freeFormStruct[0])>0):
-
 
111
                            featurestructs[featurelabel + '_fft'] = freeFormStruct
96
        struct['features'] = featurestructs
112
        struct['features'] = featurestructs
97
    
113
    
98
    return struct
114
    return struct
99
    
115
    
100
            
116
            
101
117