mirror of https://github.com/python/cpython
Fixed bug 574978 shutil example out of sync with source code
This commit is contained in:
parent
8a9e8b6d0e
commit
550fd5d799
|
@ -112,10 +112,9 @@ def copytree(src, dst, symlinks=0):
|
||||||
linkto = os.readlink(srcname)
|
linkto = os.readlink(srcname)
|
||||||
os.symlink(linkto, dstname)
|
os.symlink(linkto, dstname)
|
||||||
elif os.path.isdir(srcname):
|
elif os.path.isdir(srcname):
|
||||||
copytree(srcname, dstname)
|
copytree(srcname, dstname, symlinks)
|
||||||
else:
|
else:
|
||||||
copy2(srcname, dstname)
|
copy2(srcname, dstname)
|
||||||
# XXX What about devices, sockets etc.?
|
|
||||||
except (IOError, os.error), why:
|
except (IOError, os.error), why:
|
||||||
print "Can't copy %s to %s: %s" % (`srcname`, `dstname`, str(why))
|
print "Can't copy %s to %s: %s" % (`srcname`, `dstname`, str(why))
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
Loading…
Reference in New Issue