Clean up an unnecessary constant definition.
This commit is contained in:
parent
852b2d36f8
commit
f76618d45f
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user