mirror of https://github.com/python/cpython.git
Use test_support.TESTFN as the temporary filename.
Fix a minor stylistic nit. This closes SourceForge bug #117032.
This commit is contained in:
parent
ad6f2c8007
commit
f7ef15d6ec
|
@ -6,12 +6,12 @@
|
|||
import fcntl
|
||||
import FCNTL
|
||||
import os, sys
|
||||
from test_support import verbose
|
||||
from test_support import verbose, TESTFN
|
||||
|
||||
filename = '/tmp/delete-me'
|
||||
filename = TESTFN
|
||||
|
||||
# the example from the library docs
|
||||
f = open(filename,'w')
|
||||
f = open(filename, 'w')
|
||||
rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, os.O_NONBLOCK)
|
||||
if verbose:
|
||||
print 'Status from fnctl with O_NONBLOCK: ', rv
|
||||
|
|
Loading…
Reference in New Issue