Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit b5dc35c

Browse files
committed
If a single mongo server is specified using the -m flag, it will be set as the default connection.
1 parent 6a9fe32 commit b5dc35c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

handlers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ def __init__(self, mongos):
3535
args = MongoFakeFieldStorage({"server" : host})
3636

3737
out = MongoFakeStream()
38-
39-
name = host.replace(".", "")
40-
name = name.replace(":", "")
38+
if len(mongos) == 1:
39+
name = "default"
40+
else:
41+
name = host.replace(".", "")
42+
name = name.replace(":", "")
4143

4244
self._connect(args, out.ostream, name = name)
4345

0 commit comments

Comments
 (0)