1
0
mirror of synced 2024-11-22 09:14:23 +01:00

Fix a stacktrace in ./mat2 when the file can't be cleaned

This commit is contained in:
jvoisin 2019-10-17 22:49:57 +02:00
parent 4034cf9a1a
commit a389cc760a

1
mat2
View File

@ -137,6 +137,7 @@ def clean_meta(filename: str, is_lightweight: bool, inplace: bool, sandbox: bool
try: try:
logging.debug('Cleaning %s…', filename) logging.debug('Cleaning %s…', filename)
ret = p.remove_all() ret = p.remove_all()
if ret is True:
shutil.copymode(filename, p.output_filename) shutil.copymode(filename, p.output_filename)
if inplace is True: if inplace is True:
os.rename(p.output_filename, filename) os.rename(p.output_filename, filename)