[issue37724] [[Errno 17] File exists: ] # Try create directories that are not part of the archive with

2019-07-30 Thread Tal Cohen


Change by Tal Cohen <3talco...@gmail.com>:


--
components: Library (Lib)
nosy: Tal Cohen, lars.gustaebel
priority: normal
severity: normal
status: open
title: [[Errno 17] File exists: ] # Try create directories that are not part of 
the archive with
versions: Python 2.7

___
Python tracker 
<https://bugs.python.org/issue37724>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37724] [[Errno 17] File exists: ] # Try create directories that are not part of the archive with

2019-07-30 Thread Tal Cohen


New submission from Tal Cohen <3talco...@gmail.com>:

_extract_member, raised an exception in case of more than one process, This 
happens because "not os.path.exists(upperdirs" return True in case of 
multiprocess


CODE:
.
if upperdirs and not os.path.exists(upperdirs):
# Create directories that are not part of the archive with
# default permissions.
os.makedirs(upperdirs)



I solved the problem by creating the root path before like:
try:
os.makedirs(path)
except OSError as e:
if e.errno != os.errno.EEXIST:
raise
pass

there is an option to add :  
if e.errno != os.errno.EEXIST: in your code?

--

___
Python tracker 
<https://bugs.python.org/issue37724>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37724] [[Errno 17] File exists: ] # Try create directories that are not part of the archive with

2019-08-01 Thread Tal Cohen


Tal Cohen <3talco...@gmail.com> added the comment:

Thanks

--

___
Python tracker 
<https://bugs.python.org/issue37724>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com