Skip to content

Commit

Permalink
Merge pull request #32 from porridge/fix-withdraw-cli
Browse files Browse the repository at this point in the history
Fix withdraw-cli
  • Loading branch information
Rudd-O authored Nov 17, 2022
2 parents 01bb7bf + faa4beb commit c224640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/ledgerhelpers/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def print_line_ellipsized(fileobj, maxlen, text):
if len(text) > maxlen:
text = text[:maxlen]
fileobj.write(text)
fileobj.flush()
print()


Expand Down
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 c224640

Please sign in to comment.