diff options
author | JF Bastien <jfb@chromium.org> | 2016-01-17 11:28:58 -0800 |
---|---|---|
committer | JF Bastien <jfb@chromium.org> | 2016-01-17 11:28:58 -0800 |
commit | c01ef410c9c3df8c12504f365e04190935ac2376 (patch) | |
tree | f31ebd2ff7b0851bcc4831401e61ec6efe627b3b /scripts/support.py | |
parent | 7ec2f95c5684dbdca9d443a56e14578b52c8466b (diff) | |
download | binaryen-c01ef410c9c3df8c12504f365e04190935ac2376.tar.gz binaryen-c01ef410c9c3df8c12504f365e04190935ac2376.tar.bz2 binaryen-c01ef410c9c3df8c12504f365e04190935ac2376.zip |
untar: don't compare when a dir doesn't exist
Fixes issues in #112.
Diffstat (limited to 'scripts/support.py')
-rwxr-xr-x | scripts/support.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/support.py b/scripts/support.py index 7cb0e0963..a99fb7604 100755 --- a/scripts/support.py +++ b/scripts/support.py @@ -40,7 +40,11 @@ def _files_same(dir1, dir2, basenames): def _dirs_same(dir1, dir2, basenames): for d in basenames: - diff = filecmp.dircmp(os.path.join(dir1, d), os.path.join(dir2, d)) + left = os.path.join(dir1, d) + right = os.path.join(dir2, d) + if not (os.path.isdir(left) and os.path.isdir(right)): + return False + diff = filecmp.dircmp(right, right) if 0 != len(diff.left_only + diff.right_only + diff.diff_files + diff.common_funny + diff.funny_files): return False |