From 160aa853433be50e3e986442df4590a144e8dbd2 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 21 May 2014 17:29:37 +0100 Subject: Fix over-indentation in readconf.py 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. --- lorrycontroller/readconf.py | 6 +++--- 1 file 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']: -- cgit v1.2.1