gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant-frontend-examples] 02/02: Fix fraction conv


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant-frontend-examples] 02/02: Fix fraction conversion
Date: Tue, 21 Feb 2017 16:41:44 +0100

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

marcello pushed a commit to branch master
in repository merchant-frontend-examples.

commit c628e371735d28f7995de439b5224e7bd05ad96e
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Feb 21 16:41:46 2017 +0100

    Fix fraction conversion
---
 Python/lib/pytaler/amounts.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Python/lib/pytaler/amounts.py b/Python/lib/pytaler/amounts.py
index 00f9ae4..0e7bbfe 100644
--- a/Python/lib/pytaler/amounts.py
+++ b/Python/lib/pytaler/amounts.py
@@ -29,7 +29,7 @@ def string_to_amount(fmt):
     currency = split[1]
     split = num.split(".")
     value = int(split[0])
-    fraction = int(split[1]) * FRACTION
+    fraction = float("0." + split[1]) * FRACTION
     return dict(value=value, fraction=fraction, currency=currency)
 
 

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



reply via email to

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