打开dbf文件时如何结束python中的while true循环?

我有一个python程序,该程序打开具有大约30000条记录的dbf文件,并且我想结束我的while循环,但是由于某些原因,我的while循环保持打开状态。

      with DBF('data.DBF',recfactory=None,load =True) as table:
                for row in table:
                    stono = (row[1][1])
                    payrollid = (row[15][1])
                    busdate = (row[2][1])
                    firstname =  (row[13][1])
                    lastname = (row[14][1])

                    rows = [[stono,payrollid,busdate]]
                    print(rows) 
                try:
                    while True:
                        boolHasBlank = False
                        lastSsn = ssn
                        firstSsn = ssn 
                        newPayrollId = payrollid.strip()
                        newStoNo = stono
                        Fname = firstname
                        Lname = lastname
                        while True and stono == newStoNo and payrollid == newPayrollId:
                            if ssn is not firstSsn:
                                boolHasBlank = True
                            else:
                                lastSsn = ssn

                except EOFError as e:
                    print (e)