Clean up an unnecessary constant definition.

This commit is contained in:
Bernie Hackett 2014-08-22 16:00:31 -07:00
parent 852b2d36f8
commit f76618d45f
2 changed files with 2 additions and 4 deletions

View File

@ -59,7 +59,6 @@ except ImportError:
EPOCH_AWARE = datetime.datetime.fromtimestamp(0, utc)
EPOCH_NAIVE = datetime.datetime.utcfromtimestamp(0)
EMPTY = b""
BSONNUM = b"\x01" # Floating point
BSONSTR = b"\x02" # UTF-8 string

View File

@ -20,7 +20,6 @@ import time
import threading
import weakref
from bson import EMPTY
from pymongo import thread_util
from pymongo.errors import ConnectionFailure
@ -186,10 +185,10 @@ class SocketInfo(object):
raise
def __receive_data_on_socket(self, length):
message = EMPTY
message = b""
while length:
chunk = self.sock.recv(length)
if chunk == EMPTY:
if chunk == b"":
raise ConnectionFailure("connection closed")
length -= len(chunk)