diff --git a/setup/git_post_checkout_hook.py b/setup/git_post_checkout_hook.py index 7d46791208..e482505771 100755 --- a/setup/git_post_checkout_hook.py +++ b/setup/git_post_checkout_hook.py @@ -25,5 +25,5 @@ if flags == '1': # A branch checkout for dirpath, dirnames, filenames in os.walk('.'): for f in filenames: fpath = os.path.join(dirpath, f) - if f.endswith('.pyc'): + if f.endswith('.pyc') and '/chroot/' not in fpath: os.remove(fpath)