Fixed bug 574978 shutil example out of sync with source code

This commit is contained in:
Raymond Hettinger 2002-06-30 04:43:20 +00:00
parent 8a9e8b6d0e
commit 550fd5d799
1 changed files with 1 additions and 2 deletions

View File

@ -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}