Skip to content

Commit c15c2be

Browse files
committed
PYTHON-719 - Fix imports and indentation.
1 parent 7c5c23b commit c15c2be

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pymongo/cursor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
string_type)
2626
from bson.son import SON
2727
from pymongo import helpers, message
28-
from pymongo.read_preferences import ReadPreference, SECONDARY_OK_COMMANDS
28+
from pymongo.read_preferences import (make_read_preference,
29+
ReadPreference,
30+
SECONDARY_OK_COMMANDS)
2931
from pymongo.errors import (AutoReconnect,
3032
CursorNotFound,
3133
InvalidOperation)

pymongo/database.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
ConfigurationError,
2828
InvalidName,
2929
OperationFailure)
30-
from pymongo.read_preferences import (ReadPreference,
30+
from pymongo.read_preferences import (make_read_preference,
31+
ReadPreference,
3132
SECONDARY_OK_COMMANDS)
3233

3334

@@ -308,7 +309,7 @@ def _command(self, command, value=1,
308309
orig = make_read_preference(mode, latency, tags)
309310

310311
if command_name not in SECONDARY_OK_COMMANDS:
311-
pref = ReadPreference.PRIMARY
312+
pref = ReadPreference.PRIMARY
312313

313314
# Special-case: mapreduce can go to secondaries only if inline
314315
elif command_name == 'mapreduce':

0 commit comments

Comments
 (0)