Skip to content

Commit

Permalink
python3 does not return list of keys
Browse files Browse the repository at this point in the history
  • Loading branch information
c-holtermann committed Apr 4, 2019
1 parent 64a01f3 commit 77727ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bindings/python/example_scripts/account_analysis.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/example_scripts/rest-api/gnucash_rest.py
Expand Up @@ -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)
Expand Down

0 comments on commit 77727ff

Please sign in to comment.