Remove version_info test
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user