From 50e605771f78f9038e5acdbc0feb4d3b6258cb2b Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 27 May 2010 09:53:50 +0200 Subject: [PATCH] [FIX] imports in orm, remove unneeded imports and pointlessly (and incorrectly) defensive garbage bzr revid: xmo@openerp.com-20100527075350-5m1eaajzoshprxx8 --- bin/osv/orm.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index cfbf126a69b..d6e0e6b1395 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -37,37 +37,26 @@ # - functions # # - import calendar import copy import datetime import logging +import operator import pickle -import random import re import string -import sys import time import traceback -import datetime import types -import fields import netsvc -import tools +from lxml import etree +from tools.config import config from tools.translate import _ -import copy -import sys -import operator +import fields +import tools -try: - from lxml import etree -except ImportError: - sys.stderr.write("ERROR: Import lxml module\n") - sys.stderr.write("ERROR: Try to install the python-lxml package\n") - -from tools.config import config regex_order = re.compile('^(([a-z0-9_]+|"[a-z0-9_]+")( *desc| *asc)?( *, *|))+$', re.I)