[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: remove do
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: remove double if-else |
Date: |
Thu, 22 Jun 2017 11:37:28 +0200 |
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 89ed99c remove double if-else
89ed99c is described below
commit 89ed99c6bba23bc97ac4457d85a8a8cdefb946b9
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Jun 22 11:37:07 2017 +0200
remove double if-else
---
talerfrontends/blog/blog.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/talerfrontends/blog/blog.py b/talerfrontends/blog/blog.py
index ae16bb7..9d88a41 100644
--- a/talerfrontends/blog/blog.py
+++ b/talerfrontends/blog/blog.py
@@ -91,17 +91,17 @@ def refund():
refund=dict(value=1, fraction=0,
currency=CURRENCY),
reason="Demo reimbursement",
instance=INSTANCE))
- else:
- r = requests.get(urljoin(BACKEND_URL, "refund"),
params=dict(order_id=order_id,
-
instance=INSTANCE))
- # This (and the double if-else) will disappear once #5090 is solved.
- if r.status_code != 200:
- return backend_error(r)
- if flask.request.method == "POST":
+ if 200 != r.status_code:
+ return backend_error(r)
response = flask.make_response()
response.headers["X-Taler-Refund-Url"] = make_url("/refund/test",
("order_id", order_id))
return response
+
else:
+ r = requests.get(urljoin(BACKEND_URL, "refund"),
params=dict(order_id=order_id,
+
instance=INSTANCE))
+ if 200 != r.status_code:
+ return backend_error(r)
return flask.jsonify(r.json()), r.status_code
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant-frontends] branch master updated: remove double if-else,
gnunet <=