[Buildbot-devel] FileUpload to distinct directory on master
Jimmy John
jimmyj_in at yahoo.com
Tue Aug 26 23:49:32 UTC 2008
Hi,
I made a modification to the __init__.py method present in the buildbot/steps/transfer.py script to get the FileUpload to create directories recursively if the path leading up to the file does not exist on the master. I have tested this and it works on Linux.
Here is the change:
def __init__(self, destfile, maxsize, mode):
#if the directory leading to the file does not exist, create them recursively
dirname = os.path.dirname(destfile)
if not os.path.isdir(dirname):
os.makedirs(dirname)
self.destfile = destfile
self.fp = open(destfile, "wb")
if mode is not None:
os.chmod(destfile, mode)
self.remaining = maxsize
The above works for my needs. I tried creating a tkt but I don't seem to have sufficient privileges. Let me know if you think the above patch works in the twisted context and i'll send you the file...
thanks
Jimmy
More information about the devel
mailing list