call PyErr_Clear() when ignoring error from PyNumber_Int (closes #15516)

Patch from Tom Tromey.
3 files changed