Fix checkout hook trying to delete chroot pyc files

This commit is contained in:
Kovid Goyal 2019-04-10 16:53:52 +05:30
parent 34b86d8227
commit 57eaee584d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

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