def download(ctx, module_id):
"""Download an nFlex module.
If the module type is inline, the source_code will be saved as "main.py"
in the current working directory, otherwise the contents of the zip file
will be extracted there.
"""
try:
ctx.nflex.download(module_id)
click.echo('Module %s downloaded in the current directory' % module_id,
err=True)
except requests.exceptions.RequestException as e:
raise click.ClickException(
"Failed to download nFlex module: %s" % prep_err_msg(e)
)
评论列表
文章目录