Catch attribute error on stdout.fileno()
Catch attribute error on stdout.fileno()

When unbuffering stdout, it can fail if stdout is a StringIO. Catch the
AttributeError, as it doesn't matter if it fails. This happens with
unittest.

andrelucas/hsync