[issue23638] shutil.copytree makedirs exception

yuriy_levchenko report at bugs.python.org
Wed Mar 11 11:41:47 CET 2015


New submission from yuriy_levchenko:

We have a code:
    names = os.listdir(src)
    if ignore is not None:
        ignored_names = ignore(src, names)
    else:
        ignored_names = set()

    os.makedirs(dst)
        
    errors = []

But if I had created this folder. I have exception.

Maybe add "if"?

    if os.path.isdir(dst) is False:
        os.makedirs(dst)
        pass

----------
components: Library (Lib)
messages: 237858
nosy: yuriy_levchenko
priority: normal
severity: normal
status: open
title: shutil.copytree makedirs exception
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23638>
_______________________________________


More information about the Python-bugs-list mailing list