In practice, my little snippet here proves to be unreliable.
client.admin.command({'replSetReconfig': cfgDict}, force=True)
Sometimes it works, other times I'll end up getting stuff like:
'errmsg': 'no such cmd: force', 'code': 59
Something to do with the way pymongo is constructing a SON object...
If it gets to a point where in database.py def _command: command is:
SON([('replSetReconfig', {'version': 2668533, 'members': [{'host': 'sasp-dev-100:27017', '_id': 15}], '_id': 'rs100'}), ('force', True)])
this will work.
However sometimes (now that I want to post about it, I can't reproduce it!) I've seen errors such as:
{'ok': 0.0, 'bad cmd': {'force': True, 'replSetReconfig': {'_id': 'rs100', 'members': [{'_id': 15, 'host': 'sasp-dev-100:27017'}], 'version': 2668533}}, 'errmsg': 'no such cmd: force', 'code': 59}
... which leads me to believe that the lower levels of pymongo are seeing the first dict key as "force", an unknown command, as opposed to seeing the first dict key as "replSetReconfig".