diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 18dc11b191b..39f9b99390c 100644 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -223,6 +223,7 @@ class UnixBrowser(BaseBrowser): cmdline = [self.name] + raise_opt + args if remote or self.background: + import io inout = io.open(os.devnull, "r+") else: # for TTY browsers, we need stdin/out