Make write_metadata take a writer

This will let rewritemeta report format issues without writing to disk.
This commit is contained in:
Daniel Martí 2015-09-24 22:27:38 -07:00
parent d88914b466
commit 911994fc99
4 changed files with 12 additions and 12 deletions

View file

@ -248,7 +248,8 @@ def main():
f.write(app['Repo Type'] + ' ' + app['Repo'])
metadatapath = os.path.join('metadata', package + '.txt')
metadata.write_metadata(metadatapath, app)
with open(metadatapath, 'w') as f:
metadata.write_metadata(f, app)
logging.info("Wrote " + metadatapath)