Skip to content
Myr

Move fcntl import to be local

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 1b14bbe · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:click/_compat.py+1 added-2 removed
183 unmodified lines
184 except ImportError:185 pass186187 try:188 import fcntl189188 def set_binary_mode(f):189 try:190 fileno = f.fileno()191 except Exception:192 pass193 else:194 import fcntl195 flags = fcntl.fcntl(fileno, fcntl.F_GETFL)196 fcntl.fcntl(fileno, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)197 return f198 except ImportError:
470 unmodified lines