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

Co-authored-by: Nils Hamerlinck <nilshamerlinck@users.noreply.github.com>
pull/744/head
Elmeri Niemelä 2021-11-07 14:03:59 +02:00 committed by Alexandre D. Díaz
parent 2627cb1e9f
commit 2c8fa5a9e7
1 changed files with 1 additions and 1 deletions

View File

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