gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant-frontends] branch master updated: Returning


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant-frontends] branch master updated: Returning JSON in response to /track/order.
Date: Mon, 27 Feb 2017 16:35:11 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 14f4232  Returning JSON in response to /track/order.
14f4232 is described below

commit 14f4232f55b867f1b4bf4d7fb4bcda4767209286
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Feb 27 16:34:38 2017 +0100

    Returning JSON in response to /track/order.
---
 talerfrontends/blog/blog.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/talerfrontends/blog/blog.py b/talerfrontends/blog/blog.py
index 0fa758c..6931d62 100644
--- a/talerfrontends/blog/blog.py
+++ b/talerfrontends/blog/blog.py
@@ -193,14 +193,12 @@ def track_order():
     if r.status_code not in [200, 202, 424]:
         logger.error("failed to GET to '%s'", url)
         raise BackendError(r.status_code, r.text)
-    obj = r.json()
+    track_resp = r.json()
     if 202 == r.status_code:
-        raise TrackNotReadyError(r.status_code, obj["code"], order_id)
+        raise TrackNotReadyError(r.status_code, track_resp["code"], order_id)
     if 404 == r.status_code:
         raise CustomError(r.code, "Unknown order_id", s.status_code)
     if 424 == r.status_code:
         raise TrackTransactionConflictError(r.status_code, order_id, r.text)
-    else:
-        raise BackendError(r.status_code, r.text)
 
-    return obj
+    return flask.jsonify(r.text)

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



reply via email to

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