#NEWLINE# @ classmethod #NEWLINE# def parseAcctinfors( cls_ , acctinfors_ofx , ofx ) : #NEWLINE# #INDENT# all_accounts = [ ] #NEWLINE# for i in acctinfors_ofx . findAll ( 'acctinfo' ) : #NEWLINE# #INDENT# accounts = [ ] #NEWLINE# if i . find ( 'invacctinfo' ) : #NEWLINE# #INDENT# accounts += cls_ . parseInvstmtrs ( [ ofx ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if i . find ( 'ccacctinfo' ) : #NEWLINE# #INDENT# accounts += cls_ . parseStmtrs ( [ i ] , AccountType . CreditCard ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if i . find ( 'bankacctinfo' ) : #NEWLINE# #INDENT# accounts += cls_ . parseStmtrs ( [ i ] , AccountType . Bank ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# continue #NEWLINE# fi_ofx = ofx . find ( 'fi' ) #NEWLINE# if fi_ofx : #NEWLINE# #INDENT# for account in ofx_obj . accounts : #NEWLINE# #INDENT# account . institution = cls_ . parseOrg ( fi_ofx ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# desc = i . find ( 'desc' ) #NEWLINE# if hasattr ( desc , 'contents' ) : #NEWLINE# #INDENT# for account in accounts : #NEWLINE# #INDENT# account . desc = desc . contents [ 0 ] . strip ( ) #NEWLINE# #UNINDENT# #UNINDENT# all_accounts += accounts #NEWLINE# #UNINDENT# return all_accounts