Small fix in cli resource prefetch

When neither --tag nor --name are specified raise error

Change-Id: Iae3e796157566e373822220e631d8c439ecf258d
This commit is contained in:
Jedrzej Nowak 2016-02-12 15:11:37 +01:00
parent ac56340946
commit 0d2841a2b9

View File

@ -222,6 +222,8 @@ def prefetch(name, tag):
resources = [sresource.load(name)]
elif tag:
resources = sresource.load_by_tags(set(tag))
else:
raise click.ClickException("No resource defined, use --tag or --name")
for res in resources:
res.prefetch()