def rs_reconfigure(client, rs_config): try: client.admin.command('replSetReconfig', rs_config) except AutoReconnect: pass