def _IsExceptionClientDeployLoggable(self, exception):
"""Determines if an exception qualifes for client deploy log reistration.
Args:
exception: The exception to check.
Returns:
True iff exception qualifies for client deploy logging - basically a
system error rather than a user or error or cancellation.
"""
if isinstance(exception, KeyboardInterrupt):
return False
if (isinstance(exception, urllib2.HTTPError)
and 400 <= exception.code <= 499):
return False
return True
评论列表
文章目录