From 1ce2d26679441111a5207330cf756728085dda75 Mon Sep 17 00:00:00 2001 From: Eklavya Sharma Date: Mon, 25 Apr 2016 18:54:09 +0530 Subject: [PATCH] Prevent check-py3 from failing on no files. Now tools/travis/check-py3 does not fail unexpectedly when there are no python files in the current directory. --- tools/check-py3 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/check-py3 b/tools/check-py3 index 8f8e20042f..e027eebf9d 100755 --- a/tools/check-py3 +++ b/tools/check-py3 @@ -54,6 +54,11 @@ script_dir=$(dirname "$0") lister_path="$script_dir/lister.py" python_files="$($lister_path -f py)" +if [ -z "$python_files" ]; then + echo "There are no python files to check in the current directory." + exit 0 +fi + failed=0 for fixer in $fixers; do echo "Running Python 3 compatibility test $fixer"