[IMP] Remove except of IOError as its an alias to OSError in python3

Co-authored-by: Nils Hamerlinck <nilshamerlinck@users.noreply.github.com>
This commit is contained in:
Elmeri Niemelä
2021-11-07 14:03:59 +02:00
committed by GitHub
parent 6760507d72
commit 0ddf462e04

View File

@@ -340,7 +340,7 @@ class Py3oReport(models.TransientModel):
for temporary_file in temporary_files:
try:
os.unlink(temporary_file)
except (OSError, IOError):
except OSError:
logger.error("Error when trying to remove file %s" % temporary_file)
def create_report(self, res_ids, data):