Skip to content

Commit c5dead5

Browse files
committed
Fix trivial-validate to work without f attribute.
1 parent d287299 commit c5dead5

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

utils/trivial-validate.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ def nomes_all(where=sys.argv[1:]):
160160

161161
xpath_ruleset = etree.XPath("/ruleset")
162162
xpath_ruleset_name = etree.XPath("/ruleset/@name")
163-
xpath_ruleset_file = etree.XPath("/ruleset/@f")
164163
xpath_host = etree.XPath("/ruleset/target/@host")
165164
xpath_from = etree.XPath("/ruleset/rule/@from")
166165
xpath_to = etree.XPath("/ruleset/rule/@to")
@@ -180,13 +179,12 @@ def nomes_all(where=sys.argv[1:]):
180179
failure = 1
181180
fail("unnamed ruleset")
182181
continue
183-
rf = xpath_ruleset_file(tree)[0]
184182
from_attrib = xpath_from(tree)
185183
to = xpath_to(tree)
186184
for test in tests:
187185
if not test(tree, rn, from_attrib=from_attrib, to=to):
188186
failure = 1
189-
fail("%s failed test: %s" % (rf, test.__doc__))
187+
fail("%s failed test: %s" % (rn, test.__doc__))
190188

191189
for (host, count) in c.execute('''
192190
select host, count(host) as c from targets group by host;'''):

0 commit comments

Comments
 (0)