This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sgnn7
Recipients sgnn7
Date 2015-03-12.16:52:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426179123.75.0.888483736031.issue23649@psf.upfronthosting.co.za>
In-reply-to
Content
The code around tarfile multi-threading was fixed for me on the user-side with threading.Lock() usage so it might work to use this within the library and the directory creation could be improved by probably doing a try/except around the makedirs() call with ignoring of the exception if it's FileExistsError - my code I use elsewhere fixes this with:
    def _safe_makedirs(self, dir_path):
        try:
            makedirs(dir_path)
        # Concurrency problems need to be handled. If two threads create
        # the same dir, there might be a race between them checking and
        # doing makedirs so we handle that as gracefully as possible here.
        except FileExistsError as fee:
            if not os.path.isdir(dir_path):
                raise fee 

If I get time, I'll submit a patch but it seems like I probably won't for this.
History
Date User Action Args
2015-03-12 16:52:03sgnn7setrecipients: + sgnn7
2015-03-12 16:52:03sgnn7setmessageid: <1426179123.75.0.888483736031.issue23649@psf.upfronthosting.co.za>
2015-03-12 16:52:03sgnn7linkissue23649 messages
2015-03-12 16:52:03sgnn7create