gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant-frontend-examples] 01/02: polishing code


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant-frontend-examples] 01/02: polishing code
Date: Tue, 21 Feb 2017 16:41:43 +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 9129afa53efec4d246fde9a832903b1926cebb2b
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Feb 21 16:38:54 2017 +0100

    polishing code
---
 Python/tutorial/tutorial.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Python/tutorial/tutorial.py b/Python/tutorial/tutorial.py
index 9fa7575..be966bd 100644
--- a/Python/tutorial/tutorial.py
+++ b/Python/tutorial/tutorial.py
@@ -34,9 +34,9 @@ def index():
 
 @app.route("/donate")
 def donate():
-   resp = flask.Response(status=402)
-   resp.headers["X-Taler-Contract-Url"] = "/generate-contract"
-   return resp
+   response = flask.Response(status=402)
+   response.headers["X-Taler-Contract-Url"] = "/generate-contract"
+   return response
 
 
 @app.route("/generate-contract")
@@ -68,7 +68,7 @@ def generate_contract():
     r = requests.post(url, json=dict(order=order))
     if r.status_code != 200:
         logger.error("failed to POST to '%s'", url)
-        return r.status_code, r.text
+        return r.text, r.status_code
     proposal_resp = r.json()
     return flask.jsonify(**proposal_resp)
 
@@ -102,4 +102,3 @@ def pay():
     flask.session["paid"] = True
 
     return flask.Response(status=200)
-

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



reply via email to

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