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
31a673da
Commit
31a673da
authored
May 05, 2010
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed non needed lines
parent
d2f3e3fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
Lib/shutil.py
Lib/shutil.py
+1
-2
No files found.
Lib/shutil.py
View file @
31a673da
...
@@ -67,8 +67,6 @@ def copyfile(src, dst):
...
@@ -67,8 +67,6 @@ def copyfile(src, dst):
if
_samefile
(
src
,
dst
):
if
_samefile
(
src
,
dst
):
raise
Error
(
"`%s` and `%s` are the same file"
%
(
src
,
dst
))
raise
Error
(
"`%s` and `%s` are the same file"
%
(
src
,
dst
))
fsrc
=
None
fdst
=
None
for
fn
in
[
src
,
dst
]:
for
fn
in
[
src
,
dst
]:
try
:
try
:
st
=
os
.
stat
(
fn
)
st
=
os
.
stat
(
fn
)
...
@@ -79,6 +77,7 @@ def copyfile(src, dst):
...
@@ -79,6 +77,7 @@ def copyfile(src, dst):
# XXX What about other special files? (sockets, devices...)
# XXX What about other special files? (sockets, devices...)
if
stat
.
S_ISFIFO
(
st
.
st_mode
):
if
stat
.
S_ISFIFO
(
st
.
st_mode
):
raise
SpecialFileError
(
"`%s` is a named pipe"
%
fn
)
raise
SpecialFileError
(
"`%s` is a named pipe"
%
fn
)
with
open
(
src
,
'rb'
)
as
fsrc
:
with
open
(
src
,
'rb'
)
as
fsrc
:
with
open
(
dst
,
'wb'
)
as
fdst
:
with
open
(
dst
,
'wb'
)
as
fdst
:
copyfileobj
(
fsrc
,
fdst
)
copyfileobj
(
fsrc
,
fdst
)
...
...
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