summaryrefslogtreecommitdiff
path: root/validate.py
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-11-22 19:21:14 +0000
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-11-22 19:21:14 +0000
commitd0b781318713913c370ca92922da4e096acb7901 (patch)
treec80d2a8bce80f4500c0a0de052a7207fdab95801 /validate.py
parent972755e0718586b678a08b85566722b7074edf06 (diff)
downloadtest-definitions-pipe-d0b781318713913c370ca92922da4e096acb7901.tar.gz
validate.py: Fixed condition for checking metadata
When the YAML file is invalid there is no point in checking metadata. The condition was updated and metadata is only checked on valid YAML files. Change-Id: I12c110f0353b03f46bc7e4b0c943caca8463a6b7 Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Diffstat (limited to 'validate.py')
-rwxr-xr-xvalidate.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/validate.py b/validate.py
index cc117df..54edb75 100755
--- a/validate.py
+++ b/validate.py
@@ -153,8 +153,10 @@ def validate_external(cmd, filename, prefix, args):
def validate_file(args, path):
exitcode = 0
if path.endswith(".yaml"):
- exitcode = exitcode + validate_yaml(path, args)
- exitcode = exitcode + metadata_check(path, args)
+ exitcode = validate_yaml(path, args)
+ if exitcode == 0:
+ # if yaml isn't valid there is no point in checking metadata
+ exitcode = metadata_check(path, args)
elif run_pep8 and path.endswith(".py"):
exitcode = pep8_check(path, args)
elif path.endswith(".php"):