error while removing tmp file on windows when downloading extends fails

Bug #1083206 reported by Roman Lacko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

when running on windows, and the buildout fails to download the extens, the windows error is raised ecause the tmp file is locked:

here is the code that failes, download.py, line 179 - 187:

            try:
                tmp_path, headers = urllib.urlretrieve(url, tmp_path)
                if not check_md5sum(tmp_path, md5sum):
                    raise ChecksumError(
                        'MD5 checksum mismatch downloading %r' % url)
            except IOError, e:
                os.remove(tmp_path)
                raise zc.buildout.UserError("Error downloading extends for URL"
                                            " %s: %r" % (url, e[1:3]))

the os.remove(tmp_path) raises following error on windows:
Traceback (most recent call last):
  File "C:\Buildouts\plone43wsgi\lib\site-packages\zc\buildout\buildout.py", line 1851, in main
    command)
  File "C:\Buildouts\plone43wsgi\lib\site-packages\zc\buildout\buildout.py", line 203, in __init__
    data['buildout'].copy(), override, set()))
  File "C:\Buildouts\plone43wsgi\lib\site-packages\zc\buildout\buildout.py", line 1489, in _open
    downloaded)
  File "C:\Buildouts\plone43wsgi\lib\site-packages\zc\buildout\buildout.py", line 1434, in _open
    path, is_temp = download(filename)
  File "C:\Buildouts\plone43wsgi\lib\site-packages\zc\buildout\download.py", line 99, in __call__
    local_path, is_temp = self.download(url, md5sum, path)
  File "C:\Buildouts\plone43wsgi\lib\site-packages\zc\buildout\download.py", line 185, in download
    os.remove(tmp_path)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\rlacko~1.tem\\appdata\\local\\temp\\buildout-1qrvkz'

Regards
Roman

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.