How about...

```python
return getattr(err, 'errno', None) in (
    errno.ENETUNREACH,
    errno.EHOSTUNREACH, # For OSX
)
```