[Buildbot-devel] [win32 buildbot problem] Permission denied
Jean-Paul Calderone
exarkun at divmod.com
Sat Sep 27 20:33:41 UTC 2008
On Sat, 27 Sep 2008 11:50:51 +0800 (CST), 163Xman <163xman at 163.com> wrote:
>attachment too big, resend without it.
>
>Hi all,
>
>the output as follow
>
>E:\buildbot\buildmaster\project>buildbot checkconfig master.cfg
>Traceback (most recent call last):
> File "C:\Python24\Lib\site-packages\buildbot\scripts\runner.py", line 855, in doCheckConfig
> ConfigLoader(configFile)
> File "C:\Python24\Lib\site-packages\buildbot\scripts\checkconfig.py", line 34, in __init__
> rmtree(tempdir)
> File "C:\Python24\lib\shutil.py", line 168, in rmtree
> onerror(os.remove, fullname, sys.exc_info())
> File "C:\Python24\lib\shutil.py", line 166, in rmtree
> os.remove(fullname)
>OSError: [Errno 13] Permission denied: 'c:\\docume~1\\songma~1.tia\\locals~1\\temp\\tmp9yusgw\\master.cfg'
>E:\buildbot\buildmaster\project>
>
>
>I am not a pythoner, so I am not able to trace down the problem, please help.
>
>And the test-result of buildbot is attached
Unfortunately, it's very difficult to write software that works on Windows.
This permission denied exception is probably caused by the fact that some
process has master.cfg open when checkconfig tries to delete it. However,
it may instead be caused by the fact that some process _recently_ had the
file open. As far as I know, it's impossible to know when you'll actually
be able to delete a file on Windows. There are other deletion APIs which
are more reliable (for example, the delete-this-file-after-the-next-reboot
API), but they are not exposed to Python (except through third party libraries
such as pywin32). Even so, the API that really does what you want in most
cases - os.remove - just isn't reliable.
So perhaps there's a real bug to fix here, but perhaps deleting the copy of
the configuration (which checkconfig does after it checks it, I suppose) is
not possible reliably.
Jean-Paul
More information about the devel
mailing list