python: retry quietly on name resolution error