| Line 95... |
Line 95... |
| 95 |
executeBulk = False
|
95 |
executeBulk = False
|
| 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})
|
| 102 |
if rawHtml == "":
|
102 |
if rawHtml == "":
|
| 103 |
tprint("Could not update " + str(merchantOrder['orderId']) + " For store " + self.getName())
|
103 |
tprint("Could not update " + str(merchantOrder['orderId']) + " For store " + self.getName())
|
| 104 |
self.db.merchantOrder.update({"orderId":merchantOrder['orderId']}, {"$set":{"parseError":True}})
|
104 |
self.db.merchantOrder.update({"orderId":merchantOrder['orderId']}, {"$set":{"parseError":True}})
|
| 105 |
raise
|
105 |
raise
|