Skip to content

Commit 336966e

Browse files
Assume port 27017 if there is no :PORT in configdb
1 parent 26a1800 commit 336966e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

MongoBackup/Sharding.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ def get_config_server(self, force=False):
127127
if force or not self.config_server:
128128
configdb_hosts = self.get_configdb_hosts()
129129
try:
130-
config_host, config_port = configdb_hosts[0].split(":")
130+
config_host = configdb_hosts[0]
131+
config_port = 27017
132+
if ":" in configdb_hosts[0]:
133+
config_host, config_port = configdb_hosts[0].split(":")
131134
validate_hostname(config_host)
132135
logging.info("Found sharding config server: %s:%s" % (config_host, config_port))
133136

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.4
1+
0.3.5

0 commit comments

Comments
 (0)