summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-05-21 17:29:37 +0100
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-05-21 17:29:37 +0100
commit160aa853433be50e3e986442df4590a144e8dbd2 (patch)
treea791978cb342a67b38dfd6e790d315f9762245b8
parent3165926a539379901c5735ccfec84f5d0c389965 (diff)
downloadlorry-controller-baserock/pedroalvarez/fix-readconf.tar.gz
Fix over-indentation in readconf.pybaserock/pedroalvarez/fix-readconf
The bottle.redirect method raises an HTTP Response. With the over-indentation it was being called inside a 'with' block, making the entire block fail.
-rw-r--r--lorrycontroller/readconf.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lorrycontroller/readconf.py b/lorrycontroller/readconf.py
index 4aa3161..a42458b 100644
--- a/lorrycontroller/readconf.py
+++ b/lorrycontroller/readconf.py
@@ -90,10 +90,10 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute):
statedb.remove_trove(trovehost)
statedb.remove_lorries_for_trovehost(trovehost)
- if 'redirect' in bottle.request.forms:
- bottle.redirect(bottle.request.forms.redirect)
+ if 'redirect' in bottle.request.forms:
+ bottle.redirect(bottle.request.forms.redirect)
- return 'Configuration has been updated.'
+ return 'Configuration has been updated.'
def get_confgit(self):
if self.app_settings['debug-real-confgit']: