From 751d47b80a14bb56777dff44adf0c0ecba7ec833 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Sat, 30 Jan 2016 14:00:48 +0100 Subject: [PATCH] [FIX] flake8 (import in bad place); --- .../models/server_monitor_process.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/server_monitoring/models/server_monitor_process.py b/server_monitoring/models/server_monitor_process.py index 064e09b03..8132257a9 100644 --- a/server_monitoring/models/server_monitor_process.py +++ b/server_monitoring/models/server_monitor_process.py @@ -44,15 +44,7 @@ import types import os import threading import datetime - -# ugly hack to avoid a WARNING message when importing stdlib resource module -_logger = logging.getLogger('openerp.modules.module') -_saved_log_level = _logger.getEffectiveLevel() -_logger.setLevel(logging.ERROR) import resource -_logger.setLevel(_saved_log_level) - - import psutil from openerp.osv import orm, fields, osv @@ -60,6 +52,13 @@ from openerp import pooler from openerp import SUPERUSER_ID from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT +# ugly hack to avoid a WARNING message when importing stdlib resource module +_logger = logging.getLogger('openerp.modules.module') +_saved_log_level = _logger.getEffectiveLevel() +_logger.setLevel(logging.ERROR) + +_logger.setLevel(_saved_log_level) + _logger = logging.getLogger(__name__) BLACKLIST = (