Subversion Repositories SmartDukaan

Rev

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

Rev 16437 Rev 16440
Line 96... Line 96...
96
        filename = directory + "/" + merchantOrderId + "-" +  datetime.strftime(datetime.now(), '%d-%m:%H:%M:%S')   
96
        filename = directory + "/" + merchantOrderId + "-" +  datetime.strftime(datetime.now(), '%d-%m:%H:%M:%S')   
97
        f = open(filename,'w')
97
        f = open(filename,'w')
98
        f.write(rawHtml) # python will convert \n to os.linesep
98
        f.write(rawHtml) # python will convert \n to os.linesep
99
        f.close() # you can omit in most cases as the destructor will call if
99
        f.close() # you can omit in most cases as the destructor will call if
100
        rawHtml = "".join(["{", find_between(rawHtml,">{", "}</pre>"), "}"])
100
        rawHtml = "".join(["{", find_between(rawHtml,">{", "}</pre>"), "}"])
101
        merchantOrder = self.db.merchantOrder.find_one({"merchantOrderId":merchantOrderId})
101
        merchantOrder = self.db.merchantOrder.find_one({"merchantOrderId":merchantOrderId, "storeId":self.store_id})
102
        print rawHtml
102
        print rawHtml
103
        if rawHtml == "":
103
        if rawHtml == "":
104
            tprint("Could not update " + str(merchantOrder['orderId']) + " For store " + self.getName())
104
            tprint("Could not update " + str(merchantOrder['orderId']) + " For store " + self.getName())
105
            self.db.merchantOrder.update({"orderId":merchantOrder['orderId']}, {"$set":{"parseError":True}})
105
            self.db.merchantOrder.update({"orderId":merchantOrder['orderId']}, {"$set":{"parseError":True}})
106
            raise    
106
            raise