def getEntryMsg(self): title = '{:^79}'.format('Account Management') active_accounts = db.get_active_accounts() if active_accounts: body = fmt.accounts_short(active_accounts) else: body = 'No accounts currently defined' return title + os.linesep * 3 + body
def _transition(self, inp): if inp == 'a': return AccountMgmtState() elif inp == 'c': return CategoryMgmtState() elif inp == 't': accTransactionState = AccountTransactionState() return SelectAccountState(accTransactionState, db.get_active_accounts()) else: return ExitState()