From 1af8791abac822ef0150d9369f029009780a1fda Mon Sep 17 00:00:00 2001 From: Laurent Le Brun Date: Thu, 9 Apr 2015 14:06:33 +0000 Subject: Fix Skylark cookbook example -- MOS_MIGRATED_REVID=90708017 --- site/docs/skylark/cookbook.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'site/docs/skylark/cookbook.md') diff --git a/site/docs/skylark/cookbook.md b/site/docs/skylark/cookbook.md index 2aa2401510..dc1670372c 100644 --- a/site/docs/skylark/cookbook.md +++ b/site/docs/skylark/cookbook.md @@ -98,12 +98,9 @@ def impl(ctx): # This prints the labels of the deps attribute. print("There are %d deps" % len(ctx.attr.deps)) for i in ctx.attr.deps: - print("- %s (name %s, from package %s)" % (i, i.name, i.package)) - - # Print the list of files in the deps attribute. - # A label can represent any number of files (possibly 0). - for i in ctx.files.deps: - print(i.path) + print("- %s" % i.label) + # A label can represent any number of files (possibly 0). + print(" files = %s" % [f.path for f in i.files]) printer = rule( implementation=impl, -- cgit v1.2.3