mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
python3 does not return list of keys
This commit is contained in:
parent
64a01f3027
commit
77727ffc49
@ -117,7 +117,7 @@ def next_period_start(start_year, start_month, period_type):
|
|||||||
def period_end(start_year, start_month, period_type):
|
def period_end(start_year, start_month, period_type):
|
||||||
if period_type not in PERIODS:
|
if period_type not in PERIODS:
|
||||||
raise Exception("%s is not a valid period, should be %s" % (
|
raise Exception("%s is not a valid period, should be %s" % (
|
||||||
period_type, str(PERIODS.keys()) ) )
|
period_type, str(list(PERIODS.keys())) ) )
|
||||||
|
|
||||||
end_year, end_month = next_period_start(start_year, start_month,
|
end_year, end_month = next_period_start(start_year, start_month,
|
||||||
period_type)
|
period_type)
|
||||||
|
@ -843,7 +843,7 @@ def getSubAccounts(account):
|
|||||||
|
|
||||||
flat_accounts = []
|
flat_accounts = []
|
||||||
|
|
||||||
if 'subaccounts' in account.keys():
|
if 'subaccounts' in list(account.keys()):
|
||||||
for n, subaccount in enumerate(account['subaccounts']):
|
for n, subaccount in enumerate(account['subaccounts']):
|
||||||
flat_accounts.append(subaccount)
|
flat_accounts.append(subaccount)
|
||||||
flat_accounts = flat_accounts + getSubAccounts(subaccount)
|
flat_accounts = flat_accounts + getSubAccounts(subaccount)
|
||||||
|
Loading…
Reference in New Issue
Block a user