Skip to content

Commit ee76395

Browse files
committed
simplify imports
1 parent acc68cc commit ee76395

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/webbrowser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"""Interfaces for launching and remotely controlling Web browsers."""
33
# Maintained by Georg Brandl.
44

5+
import io
56
import os
67
import shlex
78
import sys
@@ -223,7 +224,6 @@ def _invoke(self, args, remote, autoraise):
223224
cmdline = [self.name] + raise_opt + args
224225

225226
if remote or self.background:
226-
import io
227227
inout = io.open(os.devnull, "r+")
228228
else:
229229
# for TTY browsers, we need stdin/out
@@ -348,7 +348,6 @@ def open(self, url, new=0, autoraise=1):
348348
else:
349349
action = "openURL"
350350

351-
import io
352351
devnull = io.open(os.devnull, "r+")
353352
# if possible, put browser in separate process group, so
354353
# keyboard interrupts don't affect browser as well as Python

0 commit comments

Comments
 (0)