Commit 17b718ff authored by 's avatar

Added merge from 2.1.0

parent 67a4ce4f
...@@ -117,7 +117,7 @@ import DebugLogger ...@@ -117,7 +117,7 @@ import DebugLogger
from cStringIO import StringIO from cStringIO import StringIO
from tempfile import TemporaryFile from tempfile import TemporaryFile
import socket, string, os, sys, time import socket, string, os, sys, time
from types import StringType from types import StringType, TupleType
tz_for_log=compute_timezone_for_log() tz_for_log=compute_timezone_for_log()
...@@ -219,11 +219,12 @@ class PCGIChannel(asynchat.async_chat): ...@@ -219,11 +219,12 @@ class PCGIChannel(asynchat.async_chat):
method=self.env['REQUEST_METHOD'] method=self.env['REQUEST_METHOD']
else: else:
method="GET" method="GET"
if self.addr: addr=self.addr
if addr and type(addr) is TupleType:
self.server.logger.log ( self.server.logger.log (
self.addr[0], addr[0],
'%d - - [%s] "%s %s" %d %d' % ( '%d - - [%s] "%s %s" %d %d' % (
self.addr[1], addr[1],
time.strftime ( time.strftime (
'%d/%b/%Y:%H:%M:%S ', '%d/%b/%Y:%H:%M:%S ',
time.gmtime(time.time()) time.gmtime(time.time())
......
...@@ -117,7 +117,7 @@ import DebugLogger ...@@ -117,7 +117,7 @@ import DebugLogger
from cStringIO import StringIO from cStringIO import StringIO
from tempfile import TemporaryFile from tempfile import TemporaryFile
import socket, string, os, sys, time import socket, string, os, sys, time
from types import StringType from types import StringType, TupleType
tz_for_log=compute_timezone_for_log() tz_for_log=compute_timezone_for_log()
...@@ -219,11 +219,12 @@ class PCGIChannel(asynchat.async_chat): ...@@ -219,11 +219,12 @@ class PCGIChannel(asynchat.async_chat):
method=self.env['REQUEST_METHOD'] method=self.env['REQUEST_METHOD']
else: else:
method="GET" method="GET"
if self.addr: addr=self.addr
if addr and type(addr) is TupleType:
self.server.logger.log ( self.server.logger.log (
self.addr[0], addr[0],
'%d - - [%s] "%s %s" %d %d' % ( '%d - - [%s] "%s %s" %d %d' % (
self.addr[1], addr[1],
time.strftime ( time.strftime (
'%d/%b/%Y:%H:%M:%S ', '%d/%b/%Y:%H:%M:%S ',
time.gmtime(time.time()) time.gmtime(time.time())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment