Subversion Repositories SmartDukaan

Rev

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

Rev 18931 Rev 18932
Line 1598... Line 1598...
1598
            index += 1
1598
            index += 1
1599
            text = pq(ele).text().strip()
1599
            text = pq(ele).text().strip()
1600
            if not text:
1600
            if not text:
1601
                text = pq(ele)('div').text().strip()
1601
                text = pq(ele)('div').text().strip()
1602
            tinInfo[params[index]] = text
1602
            tinInfo[params[index]] = text
1603
            address = params['counter_address']
-
 
1604
            m = re.match(".*?(\d{6}).*?", address)
-
 
1605
            if m:
-
 
1606
                tinInfo['pin'] = m.group(1)
-
 
1607
                tinInfo['pinRequired'] = False
-
 
1608
            else:
-
 
1609
                tinInfo['pinRequired'] = True
-
 
1610
                
-
 
1611
        print index, "index"
1603
        print index, "index"
1612
        if index != 8:
1604
        if index != 8:
1613
            raise
1605
            raise
-
 
1606
        address = tinInfo['counter_address']
-
 
1607
        m = re.match(".*?(\d{6}).*?", address)
-
 
1608
        if m:
-
 
1609
            tinInfo['pin'] = m.group(1)
-
 
1610
            tinInfo['pinRequired'] = False
-
 
1611
        else:
-
 
1612
            tinInfo['pinRequired'] = True
-
 
1613
 
1614
        print "TinNumber: Successfully fetched details", tin
1614
        print "TinNumber: Successfully fetched details", tin
1615
    except:
1615
    except:
1616
        traceback.print_exc()
1616
        traceback.print_exc()
1617
        tinInfo = {"isError":True,
1617
        tinInfo = {"isError":True,
1618
                    "errorMsg": "Could not find tin"
1618
                    "errorMsg": "Could not find tin"