webbrowser._invoke opens /dev/null, never closes it and a warning is
printed.
I'm attaching a patch.
The diff looks messy, but I'm just wrapping the code in a try-finally
block, the rest is just indented.