diff options
author | askeing <askeing@gmail.com> | 2016-04-17 03:27:50 +0900 |
---|---|---|
committer | askeing <askeing@gmail.com> | 2016-04-17 03:27:50 +0900 |
commit | 88c94f285eca66c62678b8f847d6a4f38ea53e3c (patch) | |
tree | a8a1cd6e1a7d9a089ff502c58b6b151f5a1a0979 /python/tidy/servo_tidy/tidy.py | |
parent | 922840852a016e454f1834833a35a365ef475805 (diff) | |
download | servo-88c94f285eca66c62678b8f847d6a4f38ea53e3c.tar.gz servo-88c94f285eca66c62678b8f847d6a4f38ea53e3c.zip |
Check the "tests/wpt/web-platform-tests" folder before loading "tools.lint" module
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 43c4eb6dc69..56c07aeae6b 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -601,11 +601,12 @@ def get_wpt_files(only_changed_files, progress): def check_wpt_lint_errors(files): wpt_working_dir = os.path.abspath(os.path.join(".", "tests", "wpt", "web-platform-tests")) - site.addsitedir(wpt_working_dir) - from tools.lint import lint - returncode = lint.lint(files) - if returncode: - yield ("WPT Lint Tool", "", "lint error(s) in Web Platform Tests: exit status {0}".format(returncode)) + if os.path.isdir(wpt_working_dir): + site.addsitedir(wpt_working_dir) + from tools.lint import lint + returncode = lint.lint(files) + if returncode: + yield ("WPT Lint Tool", "", "lint error(s) in Web Platform Tests: exit status {0}".format(returncode)) def get_file_list(directory, only_changed_files=False, exclude_dirs=[]): |