donate-cpu: try to handle OSError when unpacking a tar file

This commit is contained in:
Daniel Marjamäki 2018-11-12 14:45:39 +01:00
parent 3d629944da
commit 2d61ca8883
1 changed files with 5 additions and 2 deletions

View File

@ -164,8 +164,11 @@ def unpackPackage(workPath, tgz):
# Skip dangerous file names
continue
elif member.name.lower().endswith(('.c', '.cl', '.cpp', '.cxx', '.cc', '.c++', '.h', '.hpp', '.hxx', '.hh', '.tpp', '.txx')):
try:
tf.extract(member.name)
print(member.name)
except OSError:
pass
tf.close()
os.chdir(workPath)