Subversion Repositories SmartDukaan

Rev

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

Rev 15559 Rev 15560
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']).first()
516
                    order1 = session.query(OrdersRaw).filter_by(id=merchantOrder['orderId']).first()
517
                    order.status = result
517
                    order1.status = result
518
                    order.rawhtml = rawHtml
518
                    order1.rawhtml = rawHtml
519
                    session.commit()
519
                    session.commit()
520
                finally:
520
                finally:
521
                    session.close()
521
                    session.close()
522
                return 'PARSED_SUCCESS'
522
                return 'PARSED_SUCCESS'
523
                pass
523
                pass