Merge pull request #1850 from rubenk/python-return-error-when-config-callback-fails