Haven't tested but this can't be right. `STDOUT_FILENO` has been redirected to `os.devnull` above, but never restored.
The previous guard only sidesteps the `os.close` call and got nothing to do with `os.dup2(fd, 1)` which isn't conditional.
I released v1.1 while I still remember this... Closing, but feel free to ask questions.