diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2015-01-13 15:18:12 +0000 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2015-01-13 15:18:12 +0000 |
commit | edb5b9ebd99252a9d8228bc810504815d06d2293 (patch) | |
tree | fd4de2b47e1aae84add0f1655165848e017335a6 | |
parent | d2c5957aa870b6bc29597d9686c8dd4d81c00831 (diff) |
Added check for pep8 availability
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
-rw-r--r-- | test-definitions-ci.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test-definitions-ci.py b/test-definitions-ci.py index b7f4fc9..23a0efa 100644 --- a/test-definitions-ci.py +++ b/test-definitions-ci.py @@ -4,7 +4,13 @@ import os import subprocess import traceback import yaml -import pep8 + +run_pep8 = False +try: + import pep8 + run_pep8 = True +except: + print "PEP8 is not available" def print_stderr(message): @@ -87,7 +93,7 @@ def run_unit_tests(ignore_options): for name in files: if name.endswith("yaml"): validate_yaml(root + "/" + name) - if name.endswith("py"): + if run_pep8 and name.endswith("py"): pep8_check(root + "/" + name, ignore_options) # disable checkbashisms for now #if name.endswith("sh"): |