gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-bank] branch master updated: parse amount


From: gnunet
Subject: [taler-bank] branch master updated: parse amount
Date: Wed, 18 Dec 2019 20:24:35 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 9f1f4d1  parse amount
9f1f4d1 is described below

commit 9f1f4d11920cbc05b41837fdc0e49060fc75e5fe
Author: Florian Dold <address@hidden>
AuthorDate: Wed Dec 18 20:24:32 2019 +0100

    parse amount
---
 talerbank/app/management/commands/top_up.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/talerbank/app/management/commands/top_up.py 
b/talerbank/app/management/commands/top_up.py
index 04cbe51..be55387 100644
--- a/talerbank/app/management/commands/top_up.py
+++ b/talerbank/app/management/commands/top_up.py
@@ -66,7 +66,11 @@ class Command(BaseCommand):
         except BankAccount.DoesNotExist:
             LOGGER.error("Debit account (bank's own account) does not exist.")
             sys.exit(1)
-
+        try:
+            amount = Amount.parse(options["amount"])
+        except BadFormatAmount:
+            LOGGER.error("Amount's format is wrong: respect C:X.Y.")
+            sys.exit(1)
         try:
             transaction = wire_transfer(
                 amount, user.bankaccount, credit_account, options["subject"]

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]