From e326ccac2c86fd6f54d900b5722149b75c6a981a Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Sun, 5 Jun 2011 14:00:56 -0500 Subject: Validate: Unsuppress errors for invalid schema paths (#1007) Signed-off-by: Sol Jerome --- src/lib/Server/Lint/Validate.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib/Server/Lint/Validate.py') diff --git a/src/lib/Server/Lint/Validate.py b/src/lib/Server/Lint/Validate.py index c9b5688e1..a561232b6 100644 --- a/src/lib/Server/Lint/Validate.py +++ b/src/lib/Server/Lint/Validate.py @@ -1,10 +1,12 @@ +import fnmatch import glob import lxml.etree import os -import fnmatch +from subprocess import Popen, PIPE, STDOUT +import sys + import Bcfg2.Options import Bcfg2.Server.Lint -from subprocess import Popen, PIPE, STDOUT class Validate(Bcfg2.Server.Lint.ServerlessPlugin): """ Ensure that the repo validates """ @@ -47,6 +49,10 @@ class Validate(Bcfg2.Server.Lint.ServerlessPlugin): try: schema = lxml.etree.XMLSchema(lxml.etree.parse(schemaname % schemadir)) + except IOError: + e = sys.exc_info()[1] + self.LintError("input/output error", e.message) + continue except: self.LintError("schema-failed-to-parse", "Failed to process schema %s" % -- cgit v1.2.3-1-g7c22