Commit 470280e3 authored by Kevin Deldycke's avatar Kevin Deldycke

Use shutil to correct the same problem as the one discribe here:...

Use shutil to correct the same problem as the one discribe here: http://mail.python.org/pipermail/python-list/2005-February/266553.html


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5418 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d4dd3670
......@@ -35,6 +35,7 @@ import tarfile
import os
import sys
import tempfile
import shutil
property_list = ('title', 'version', 'description', 'license', 'dependency_list', 'copyright_list')
......@@ -59,9 +60,9 @@ def readBusinessTemplate(tar):
property_dict[name_list[2]] = text
finally:
f.close()
return property_dict
def generateInformation(fd):
os.write(fd, '<?xml version="1.0"?>\n')
os.write(fd, '<repository>\n')
......@@ -90,9 +91,9 @@ def generateInformation(fd):
info('done\n')
finally:
tar.close()
os.write(fd, '</repository>\n')
def main():
if len(sys.argv) < 2:
dir_list = ['.']
......@@ -112,7 +113,7 @@ def main():
os.remove(path)
raise
else:
os.rename(path, 'bt5list')
shutil.move(path, 'bt5list')
os.chdir(cwd)
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment