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

Co-authored-by: Nils Hamerlinck <nilshamerlinck@users.noreply.github.com>
pull/445/head
Elmeri Niemelä 2021-11-07 14:03:59 +02:00 committed by GitHub
parent 6760507d72
commit 0ddf462e04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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:
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):