Loading src/resources/models.py +2 −2 Original line number Diff line number Diff line Loading @@ -353,7 +353,7 @@ class File(Resource): try: image = Image.open(self.local_path()) val, _ = image.size except UnidentifiedImageError: except (UnidentifiedImageError, FileNotFoundError): logger.warning( f"Could not get width for file({self.pk}) using PIL. Possible image corruption." ) Loading @@ -376,7 +376,7 @@ class File(Resource): try: image = Image.open(self.local_path()) _, val = image.size except UnidentifiedImageError: except (UnidentifiedImageError, FileNotFoundError): logger.warning( f"Could not get height for file({self.pk}) using PIL. Possible image corruption." ) Loading Loading
src/resources/models.py +2 −2 Original line number Diff line number Diff line Loading @@ -353,7 +353,7 @@ class File(Resource): try: image = Image.open(self.local_path()) val, _ = image.size except UnidentifiedImageError: except (UnidentifiedImageError, FileNotFoundError): logger.warning( f"Could not get width for file({self.pk}) using PIL. Possible image corruption." ) Loading @@ -376,7 +376,7 @@ class File(Resource): try: image = Image.open(self.local_path()) _, val = image.size except UnidentifiedImageError: except (UnidentifiedImageError, FileNotFoundError): logger.warning( f"Could not get height for file({self.pk}) using PIL. Possible image corruption." ) Loading