python3 does not return list of keys

pull/481/head
c-holtermann 7 years ago
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):
if period_type not in PERIODS:
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,
period_type)

@ -843,7 +843,7 @@ def getSubAccounts(account):
flat_accounts = []
if 'subaccounts' in account.keys():
if 'subaccounts' in list(account.keys()):
for n, subaccount in enumerate(account['subaccounts']):
flat_accounts.append(subaccount)
flat_accounts = flat_accounts + getSubAccounts(subaccount)

Loading…
Cancel
Save