It's an upstream bug that has been fixed in newer versions of setuptools/distribute. Writing to `/dev/null` should not trigger a `SandboxViolation`. While we could make an effort to only catch a `SandboxViolation` rather than `DistutilsError` (e.g. get the exception object and check if the name of its type is exactly `'SandboxViolation'`), but given the code inside the `try:` block, I think that `SandboxViolation` is the only subclass of `DistutilsError` that could be raised.