Remove version_info test

This commit is contained in:
Cédric Krier
2011-07-12 23:54:14 +02:00
parent 852f04dc51
commit 1ce3832259
3 changed files with 2 additions and 13 deletions
+1 -4
View File
@@ -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:
-5
View File
@@ -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)
+1 -4
View File
@@ -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