@staticmethod
def __can_accept_status_code(err, expected_status):
    assert isinstance(err, compat_urllib_error.HTTPError)
    if (expected_status is None):
        return False
    if isinstance(expected_status, compat_integer_types):
        return (err.code == expected_status)
    elif isinstance(expected_status, (list, tuple)):
        return (err.code in expected_status)
    elif callable(expected_status):
        return (expected_status(err.code) is True)
    else:
        assert False
@staticmethod
def __can_accept_status_code(err, expected_status):
    assert isinstance(err, compat_urllib_error.HTTPError)
    if (expected_status is None):
        return False
    if isinstance(expected_status, compat_integer_types):
        return (err.code == expected_status)
    elif isinstance(expected_status, (list, tuple)):
        return (err.code in expected_status)
    elif callable(expected_status):
        return (expected_status(err.code) is True)
    else:
        assert False