From 8cce6a5a2a4ba9b03200b26073820ebdcfdf9ef0 Mon Sep 17 00:00:00 2001 From: Adil Houmadi Date: Thu, 17 Jul 2014 22:41:07 +0200 Subject: [PATCH] Try to make flake8 happy ! ./web_easy_switch_company/controllers/main.py:26:1: E302 expected 2 blank lines, found 1 ./web_easy_switch_company/controllers/main.py:32:9: F841 local variable 'context' is assigned to but never used ./web_easy_switch_company/controllers/main.py:36:1: W391 blank line at end of file --- web_easy_switch_company/controllers/main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web_easy_switch_company/controllers/main.py b/web_easy_switch_company/controllers/main.py index b8b6a2b6..5215e1ac 100644 --- a/web_easy_switch_company/controllers/main.py +++ b/web_easy_switch_company/controllers/main.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +#-*- encoding: utf-8 -*- ############################################################################## # # Web Easy Switch Company module for OpenERP @@ -23,14 +23,12 @@ import openerp import openerp.http as http from openerp.http import request -class WebEasySwitchCompanyController(http.Controller): +class WebEasySwitchCompanyController(http.Controller): @http.route('/web_easy_switch_company/switch/change_current_company', type='json', auth='none') def change_current_company(self, company_id): registry = openerp.modules.registry.RegistryManager.get(request.session.db) uid = request.session.uid - context = request.session.context with registry.cursor() as cr: res = registry.get("res.users").change_current_company(cr, uid, company_id) - return res - + return res \ No newline at end of file