timeout could be None.

This commit is contained in:
Benoit Chesneau 2010-02-03 10:41:30 +01:00
parent 6c405b9d14
commit a57e2ec7e6
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
# Django settings for djangotest project.
import platform
PRODUCTION_MODE = platform.node().startswith('http')
DEBUG = True
TEMPLATE_DEBUG = DEBUG

View File

@ -80,7 +80,7 @@ def write(sock, data):
def write_nonblock(sock, data):
timeout = sock.gettimeout()
if sock.gettimeout() > 0.0:
if timeout != 0.0:
try:
sock.setblocking(0)
return write(sock, data)