Skip to content

Commit

Permalink
Fix wrong import.
Browse files Browse the repository at this point in the history
Before the program would fail with:

```
  File ".../ledgerhelpers/src/ledgerhelpers/programs/withdrawcli.py", line 45, in main
    amount1 = common.prompt_for_amount(
AttributeError: module 'ledgerhelpers.legacy' has no attribute 'prompt_for_amount'. Did you mean: 'prompt_for_account'?
```
  • Loading branch information
porridge committed Nov 15, 2022
1 parent 01bb7bf commit 9305eaf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ledgerhelpers/programs/withdrawcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys
import ledgerhelpers
import ledgerhelpers.legacy as common
import ledgerhelpers.legacy_needsledger as common2
import ledgerhelpers.journal as journal


Expand Down Expand Up @@ -42,12 +43,12 @@ def main():
s["last_deposit_account"] = asset2
asset2_currency = commodities.get(asset2, ledger.Amount("$ 1"))

amount1 = common.prompt_for_amount(
amount1 = common2.prompt_for_amount(
sys.stdin, sys.stdout,
"How much?", asset1_currency
)

amount2 = common.prompt_for_amount(
amount2 = common2.prompt_for_amount(
sys.stdin, sys.stdout,
"What was deposited?", asset2_currency
)
Expand Down

0 comments on commit 9305eaf

Please sign in to comment.