Update core.py

Prevent infinite loop push when fails save_extensions function on server side.