Subversion Repositories SmartDukaan

Rev

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

Rev 20285 Rev 20286
Line 71... Line 71...
71
        else:
71
        else:
72
            syn_brand = synonymsMap.get((item['brand']).upper())
72
            syn_brand = synonymsMap.get((item['brand']).upper())
73
            model_syn = modelNameSynonymMap.get(item['skuBundleId'])
73
            model_syn = modelNameSynonymMap.get(item['skuBundleId'])
74
            if len(str(item['thumbnail']).strip()) == 0:
74
            if len(str(item['thumbnail']).strip()) == 0:
75
                item['thumbnail'] = "http://api.profittill.com/img/no_image_available.png"
75
                item['thumbnail'] = "http://api.profittill.com/img/no_image_available.png"
76
            
76
            try:
77
            skuInfo = __SkuInfo(str(item['skuBundleId']), [int(item['_id'])], str(item['brand']).strip(), str(item['model_name']).strip(), \
77
                skuInfo = __SkuInfo(str(item['skuBundleId']), [int(item['_id'])], str(item['brand']).strip(), str(item['model_name']).strip(), \
78
                                int(item['category_id']), int(item['subCategoryId']), item['thumbnail'].strip(), title, syn_brand, model_syn, [item['source_product_name'].strip()], \
78
                                int(item['category_id']), int(item['subCategoryId']), item['thumbnail'].strip(), title, syn_brand, model_syn, [item['source_product_name'].strip()], \
79
                                CATEGORY_MAP.get(int(item['category_id'])), SUB_CATEGORY_MAP.get(int(item['subCategoryId'])))
79
                                CATEGORY_MAP.get(int(item['category_id'])), SUB_CATEGORY_MAP.get(int(item['subCategoryId'])))
-
 
80
            except:
-
 
81
                print "Exception in item ",item['_id']
80
            
82
            
81
            catalogMap[int(item['skuBundleId'])] = skuInfo
83
            catalogMap[int(item['skuBundleId'])] = skuInfo
82
            
84
            
83
    for data in catalogMap.values():
85
    for data in catalogMap.values():
84
        l.append(data.__dict__)
86
        l.append(data.__dict__)