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.
This commit is contained in:
Eklavya Sharma 2016-04-25 18:54:09 +05:30 committed by Tim Abbott
parent b4009c28d0
commit 1ce2d26679
1 changed files with 5 additions and 0 deletions

View File

@ -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"