From 1ce3832259afc3cafe857f980ae8b0bcb60caef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 12 Jul 2011 23:54:14 +0200 Subject: [PATCH] Remove version_info test --- trytond/protocols/jsonrpc.py | 5 +---- trytond/protocols/webdav.py | 5 ----- trytond/pyson.py | 5 +---- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/trytond/protocols/jsonrpc.py b/trytond/protocols/jsonrpc.py index 0f0b0f7ed7..2bc24caca1 100644 --- a/trytond/protocols/jsonrpc.py +++ b/trytond/protocols/jsonrpc.py @@ -22,10 +22,7 @@ import posixpath import urllib import datetime from decimal import Decimal -if sys.version_info < (2, 6): - import simplejson as json -else: - import json +import json def object_hook(dct): if '__class__' in dct: diff --git a/trytond/protocols/webdav.py b/trytond/protocols/webdav.py index f55d98ec3c..b0be2a9010 100644 --- a/trytond/protocols/webdav.py +++ b/trytond/protocols/webdav.py @@ -81,11 +81,6 @@ class BaseThreadedHTTPServer(SocketServer.ThreadingMixIn, max_children = CONFIG['max_thread'] def server_bind(self): - # Python < 2.6 doesn't handle self.timeout - if sys.version_info < (2, 6): - # breaks the socket under BSD, see http://bugs.python.org/issue7995 - self.socket.settimeout(1) - self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) BaseHTTPServer.HTTPServer.server_bind(self) diff --git a/trytond/pyson.py b/trytond/pyson.py index 817161da24..79a2fa49ae 100644 --- a/trytond/pyson.py +++ b/trytond/pyson.py @@ -1,10 +1,7 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys -if sys.version_info < (2, 6): - import simplejson as json -else: - import json +import json import datetime from functools import reduce