Skip to content
Myr

Merge pull request #965 from smurfix/upstream

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

Revert 60ef759: move "fcntl" import

authored by JosiahDub · committed by GitHub · parents 16da1e9, a4b6bbd · Browse files · 1 file+6 added−6 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+6 added−6 removed

  • other:+6 added−6 removed

1 file+6 added−6 removed

modified:click/_compat.py+6 added-6 removed
185 unmodified lines
186 return f187188 try:189 import msvcrt190190 except ImportError:191 pass192 else:193 def set_binary_mode(f):194 try:195 fileno = f.fileno()196 except Exception:197 pass198 else:199 msvcrt.setmode(fileno, os.O_BINARY)200 return f199 except ImportError:200 pass201202 try:203 import fcntl204204 except ImportError:205 pass206 else:207 def set_binary_mode(f):208 try:209 fileno = f.fileno()210 except Exception:
1 unmodified line
212 else:213 flags = fcntl.fcntl(fileno, fcntl.F_GETFL)214 fcntl.fcntl(fileno, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)215 return f214 except ImportError:215 pass216217 def isidentifier(x):218 return _identifier_re.search(x) is not None219
475 unmodified lines