donate-cpu: try to handle OSError when unpacking a tar file
This commit is contained in:
parent
3d629944da
commit
2d61ca8883
|
@ -164,8 +164,11 @@ def unpackPackage(workPath, tgz):
|
||||||
# Skip dangerous file names
|
# Skip dangerous file names
|
||||||
continue
|
continue
|
||||||
elif member.name.lower().endswith(('.c', '.cl', '.cpp', '.cxx', '.cc', '.c++', '.h', '.hpp', '.hxx', '.hh', '.tpp', '.txx')):
|
elif member.name.lower().endswith(('.c', '.cl', '.cpp', '.cxx', '.cc', '.c++', '.h', '.hpp', '.hxx', '.hh', '.tpp', '.txx')):
|
||||||
tf.extract(member.name)
|
try:
|
||||||
print(member.name)
|
tf.extract(member.name)
|
||||||
|
print(member.name)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
tf.close()
|
tf.close()
|
||||||
os.chdir(workPath)
|
os.chdir(workPath)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue