From 9e75ef897d70e91d2f4d020485816dfa8c04de98 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 12 Jun 2011 23:53:33 -0400 Subject: [PATCH] cleaner --- httpbin/core.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/httpbin/core.py b/httpbin/core.py index be83fbc..063c0a6 100644 --- a/httpbin/core.py +++ b/httpbin/core.py @@ -165,12 +165,10 @@ def redirect_n_times(n): assert n > 0 - n += -1 - - if (n == 0): + if (n == 1): return redirect('/') - return redirect('/redirect/{0}'.format(n)) + return redirect('/redirect/{0}'.format(n-1)) @app.route('/status/')