Subversion Repositories SmartDukaan

Rev

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

Rev 15555 Rev 15557
Line 511... Line 511...
511
                f = open(filename,'w')
511
                f = open(filename,'w')
512
                f.write(rawHtml) # python will convert \n to os.linesep
512
                f.write(rawHtml) # python will convert \n to os.linesep
513
                f.close() # you can omit in most cases as the destructor will call if
513
                f.close() # you can omit in most cases as the destructor will call if
514
                result = self.parseOrderRawHtml(merchantOrder['orderId'], merchantOrder['subTagId'], merchantOrder['userId'], rawHtml, url, True)['result']
514
                result = self.parseOrderRawHtml(merchantOrder['orderId'], merchantOrder['subTagId'], merchantOrder['userId'], rawHtml, url, True)['result']
515
                try:
515
                try:
516
                    order = session.query(OrdersRaw).filter_by(id=merchantOrder['orderId'])
516
                    order = session.query(OrdersRaw).filter_by(id=merchantOrder['orderId']).first()
517
                    order.status = result
517
                    order.status = result
518
                    order.raw_html = rawHtml
518
                    order.raw_html = rawHtml
519
                    session.commit()
519
                    session.commit()
520
                finally:
520
                finally:
521
                    session.close()
521
                    session.close()