Skip to content
Commits on Source (2)
......@@ -52,7 +52,10 @@ MACHINEREADABLEARCHIVE='/srv/blends.debian.org/www/_'+TDNAME+'/'+TDNAME+'.tar.xz
READMEDEBIANARCHIVE='/srv/blends.debian.org/www/_'+TDNAME+'/README.Debian.tar.xz'
TARGETDIR=os.path.join(os.environ['HOME'],TDNAME)
# cleanup TARGETDIR first
try:
shutil.rmtree(TARGETDIR)
except:
pass
os.makedirs(TARGETDIR)
def get_blends_groups():
......@@ -78,7 +81,11 @@ def output_metadata(subdir, metadata):
if item['name'] in metadata:
file_info = project.repository_blob(item['id'])
content = base64.b64decode(file_info['content'])
with open(os.path.join(namedir,name+'.'+item['name']), 'wb') as out:
if item['name'] == 'metadata':
ext = '.upstream'
else:
ext = '.'+item['name']
with open(os.path.join(namedir,name+ext), 'wb') as out:
out.write(content)
out.close()
return True
......