[REF] remove unused import, always import literal_eval from tools.safe_eval.

bzr revid: florent.xicluna@gmail.com-20120115214214-0rjwn80choc9g0fs
This commit is contained in:
Florent Xicluna 2012-01-15 22:42:14 +01:00
parent 9b02aed518
commit 40c1de87d8
9 changed files with 10 additions and 24 deletions

View File

@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import ast
import copy
import logging
import os
@ -31,7 +30,7 @@ import netsvc
from osv import fields,osv
from report.report_sxw import report_sxw, report_rml
from tools.config import config
from tools.safe_eval import safe_eval as eval
from tools.safe_eval import safe_eval as eval, literal_eval
from tools.translate import _
from socket import gethostname
@ -920,7 +919,7 @@ class act_client(osv.osv):
def _get_params(self, cr, uid, ids, field_name, arg, context):
return dict([
((record.id, ast.literal_eval(record.params_store))
((record.id, literal_eval(record.params_store))
if record.params_store else (record.id, False))
for record in self.browse(cr, uid, ids, context=context)
])

View File

@ -30,7 +30,6 @@ import socket
import sys
import threading
import time
import traceback
import types
from pprint import pformat

View File

@ -39,21 +39,17 @@
static HTTP, DAV or other.
"""
from websrv_lib import *
import openerp.netsvc as netsvc
import errno
import threading
import openerp.tools as tools
import base64
import posixpath
import urllib
import os
import select
import socket
import xmlrpclib
import logging
from SimpleXMLRPCServer import SimpleXMLRPCDispatcher
from websrv_lib import *
import openerp.netsvc as netsvc
import openerp.tools as tools
try:
import fcntl
except ImportError:

View File

@ -39,6 +39,7 @@ import openerp.sql_db as sql_db
import openerp.tools as tools
import openerp.modules
import openerp.exceptions
from openerp.service import http_server
#.apidoc title: Exported Service methods
#.apidoc module-mods: member-order: bysource

View File

@ -32,9 +32,6 @@
usable in other projects, too.
"""
import socket
import base64
import errno
import SocketServer
from BaseHTTPServer import *
from SimpleHTTPServer import SimpleHTTPRequestHandler

View File

@ -37,8 +37,7 @@ __all__ = ['db_connect', 'close_db']
from threading import currentThread
import logging
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_SERIALIZABLE,\
ISOLATION_LEVEL_REPEATABLE_READ
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_REPEATABLE_READ
from psycopg2.psycopg1 import cursor as psycopg1cursor
from psycopg2.pool import PoolError
@ -421,7 +420,7 @@ class ConnectionPool(object):
try:
result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
except psycopg2.Error, e:
except psycopg2.Error:
self.__logger.exception('Connection to the database failed')
raise
self._connections.append((result, True))

View File

@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import os
import time
import unittest2
import xmlrpclib
import openerp

View File

@ -7,11 +7,8 @@
# > OPENERP_ADDONS_PATH='../../../addons/trunk' OPENERP_PORT=8069 \
# OPENERP_DATABASE=yy PYTHONPATH=../:. unit2 test_ir_sequence
# This assume an existing database.
import os
import psycopg2
import time
import unittest2
import xmlrpclib
import openerp
import common

View File

@ -6,7 +6,6 @@
# OPENERP_DATABASE=yy nosetests tests/test_xmlrpc.py
# > OPENERP_ADDONS_PATH='../../../addons/trunk' OPENERP_PORT=8069 \
# OPENERP_DATABASE=yy PYTHONPATH=../:. unit2 test_xmlrpc
import os
import time
import unittest2
import xmlrpclib