with file(os.path.join(ctx.archive, 'orig.config.yaml'), 'w') as f:
yaml.safe_dump(ctx.config, f, default_flow_style=False)
+ info = {
+ 'name': ctx.name,
+ 'description': ctx.description,
+ 'owner': ctx.owner,
+ 'pid': os.getpid(),
+ }
+ with file(os.path.join(ctx.archive, 'info.yaml'), 'w') as f:
+ yaml.safe_dump(info, f, default_flow_style=False)
+
def main():
from gevent import monkey
ctx.owner = get_user()
write_initial_metadata(ctx)
- if ctx.archive is not None:
- info = {}
- info['pid'] = os.getpid();
- info['description'] = ctx.description;
- info['run'] = ctx.name;
- info['owner'] = ctx.owner;
- with file(os.path.join(ctx.archive, 'info.yaml'), 'w') as f:
- yaml.safe_dump(info, f, default_flow_style=False)
log.debug('test')
raise RuntimeError('hi there')