Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7e5206a9
Commit
7e5206a9
authored
Aug 13, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NamedTemporaryFile(), TemporaryFile(): removed needless local vrbl 'bin'.
parent
55b1592d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Lib/tempfile.py
Lib/tempfile.py
+8
-6
No files found.
Lib/tempfile.py
View file @
7e5206a9
...
...
@@ -396,9 +396,10 @@ def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",
closed.
"""
bin
=
'b'
in
mode
if
bin
:
flags
=
_bin_openflags
else
:
flags
=
_text_openflags
if
'b'
in
mode
:
flags
=
_bin_openflags
else
:
flags
=
_text_openflags
# Setting O_TEMPORARY in the flags causes the OS to delete
# the file when it is closed. This is only supported by Windows.
...
...
@@ -428,9 +429,10 @@ else:
exist when it is closed.
"""
bin
=
'b'
in
mode
if
bin
:
flags
=
_bin_openflags
else
:
flags
=
_text_openflags
if
'b'
in
mode
:
flags
=
_bin_openflags
else
:
flags
=
_text_openflags
(
fd
,
name
)
=
_mkstemp_inner
(
dir
,
prefix
,
suffix
,
flags
)
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment