manually adapt few imports
This commit is contained in:
1 parent
aa2bf4134e
commit
01bab81432
28 files changed
+174
-189
No files matched your search
@@ -436,13 +436,13 @@ def encode_pair(name, value):
|
||||
if nameLength < 128:
|
||||
s = chr(nameLength)
|
||||
else:
|
||||
s = struct.pack('!L', nameLength | 0x80000000L)
|
||||
s = struct.pack('!L', nameLength | 0x80000000)
|
||||
|
||||
valueLength = len(value)
|
||||
if valueLength < 128:
|
||||
s += chr(valueLength)
|
||||
else:
|
||||
s += struct.pack('!L', valueLength | 0x80000000L)
|
||||
s += struct.pack('!L', valueLength | 0x80000000)
|
||||
|
||||
return s + name + value
|
||||
|
||||
@@ -592,7 +592,7 @@ class Request(object):
|
||||
self._flush()
|
||||
self._end(appStatus, protocolStatus)
|
||||
|
||||
def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
|
||||
def _end(self, appStatus=0, protocolStatus=FCGI_REQUEST_COMPLETE):
|
||||
self._conn.end_request(self, appStatus, protocolStatus)
|
||||
|
||||
def _flush(self):
|
||||
@@ -615,7 +615,7 @@ class CGIRequest(Request):
|
||||
self.stderr = sys.stderr
|
||||
self.data = StringIO.StringIO()
|
||||
|
||||
def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
|
||||
def _end(self, appStatus=0, protocolStatus=FCGI_REQUEST_COMPLETE):
|
||||
sys.exit(appStatus)
|
||||
|
||||
def _flush(self):
|
||||
@@ -714,7 +714,7 @@ class Connection(object):
|
||||
"""
|
||||
rec.write(self._sock)
|
||||
|
||||
def end_request(self, req, appStatus=0L,
|
||||
def end_request(self, req, appStatus=0,
|
||||
protocolStatus=FCGI_REQUEST_COMPLETE, remove=True):
|
||||
"""
|
||||
End a Request.
|
||||
@@ -763,7 +763,7 @@ class Connection(object):
|
||||
|
||||
if not self._multiplexed and self._requests:
|
||||
# Can't multiplex requests.
|
||||
self.end_request(req, 0L, FCGI_CANT_MPX_CONN, remove=False)
|
||||
self.end_request(req, 0, FCGI_CANT_MPX_CONN, remove=False)
|
||||
else:
|
||||
self._requests[inrec.requestId] = req
|
||||
|
||||
@@ -854,7 +854,7 @@ class MultiplexedConnection(Connection):
|
||||
finally:
|
||||
self._lock.release()
|
||||
|
||||
def end_request(self, req, appStatus=0L,
|
||||
def end_request(self, req, appStatus=0,
|
||||
protocolStatus=FCGI_REQUEST_COMPLETE, remove=True):
|
||||
self._lock.acquire()
|
||||
try:
|
||||
|
||||
@@ -1447,7 +1447,7 @@ class _BaseV6(object):
|
||||
|
||||
try:
|
||||
# Now, parse the hextets into a 128-bit integer.
|
||||
ip_int = 0L
|
||||
ip_int = 0
|
||||
for i in xrange(parts_hi):
|
||||
ip_int <<= 16
|
||||
ip_int |= self._parse_hextet(parts[i])
|
||||
|
||||
@@ -52,8 +52,7 @@ _HISTORY_KIND = '_Shell_History'
|
||||
# Types that can't be pickled.
|
||||
UNPICKLABLE_TYPES = [
|
||||
types.ModuleType,
|
||||
types.TypeType,
|
||||
types.ClassType,
|
||||
type,
|
||||
types.FunctionType,
|
||||
]
|
||||
|
||||
|
||||
Reference in new issue
Block a user