diff --git a/post-checkout-hooks/delete-pyc-files.hook b/post-checkout-hooks/delete-pyc-files.hook index 16a9972..cb7a1f0 100644 --- a/post-checkout-hooks/delete-pyc-files.hook +++ b/post-checkout-hooks/delete-pyc-files.hook @@ -17,11 +17,11 @@ previous_head = sys.argv[1] new_head = sys.argv[2] is_branch_checkout = sys.argv[3] if is_branch_checkout == "0": -print "post-checkout: This is a file checkout. Nothing to do." -sys.exit(0) + print "post-checkout: This is a file checkout. Nothing to do." + sys.exit(0) print "post-checkout: Deleting all '.pyc' files in working directory" for root, dirs, files in os.walk('.'): -for filename in files: -ext = os.path.splitext(filename)[1] -if ext == '.pyc': -os.unlink(os.path.join(root, filename)) \ No newline at end of file + for filename in files: + ext = os.path.splitext(filename)[1] + if ext == '.pyc': + os.unlink(os.path.join(root, filename))