[IMP] lint cleanup

bzr revid: odo@openerp.com-20110624133335-jf5kg6dh9kgxw2dg
This commit is contained in:
Olivier Dony 2011-06-24 15:33:35 +02:00
parent 60cbf9bf14
commit 301497c543
6 changed files with 2 additions and 8 deletions

View File

@ -21,7 +21,6 @@
import logging
import re
import time
from operator import itemgetter
from osv import fields,osv
import netsvc

View File

@ -24,7 +24,6 @@ from lxml import etree
from tools import graph
from tools.safe_eval import safe_eval as eval
import tools
import netsvc
import os
import logging

View File

@ -35,7 +35,6 @@ import socket
import sys
import threading
import time
import warnings
import types
from pprint import pformat
@ -186,7 +185,6 @@ class ColoredFormatter(DBFormatter):
return DBFormatter.format(self, record)
def init_logger():
import os
from tools.translate import resetlocale
resetlocale()

View File

@ -972,7 +972,7 @@ class orm_template(object):
if field[len(prefix)]=='id':
try:
data_res_id = _get_id(model_name, line[i], current_module, 'id')
except ValueError, e:
except ValueError:
pass
xml_id = line[i]
continue

View File

@ -45,7 +45,6 @@ import openerp.loglevels as loglevels
import openerp.pooler as pooler
from config import config
from translate import _
from yaml_import import convert_yaml_import
# List of etree._Element subclasses that we choose to ignore when parsing XML.
from misc import SKIPPED_ELEMENT_TYPES

View File

@ -177,7 +177,7 @@ class YamlInterpreter(object):
try:
_, id = self.pool.get('ir.model.data').get_object_reference(self.cr, self.uid, module, checked_xml_id)
self.id_map[xml_id] = id
except ValueError, e:
except ValueError:
raise ValueError("""%s not found when processing %s.
This Yaml file appears to depend on missing data. This often happens for
tests that belong to a module's test suite and depend on each other.""" % (checked_xml_id, self.filename))
@ -488,7 +488,6 @@ class YamlInterpreter(object):
if self.isnoupdate(function) and self.mode != 'init':
return
model = self.get_model(function.model)
context = self.get_context(function, self.eval_context)
if function.eval:
args = self.process_eval(function.eval)
else: