1
0
鏡像自 https://github.com/arsenetar/dupeguru.git synced 2025-09-11 17:58:17 +00:00

Expand fix for #630 to fix #551

This commit is contained in:
Andrew Senetar 2021-08-28 17:29:25 -05:00
父節點 3da9d5d869
當前提交 0a0694e095
簽署人: arsenetar
GPG 金鑰 ID: C63300DCE48AB2F1

查看文件

@ -29,14 +29,16 @@ class File(PhotoBase):
def _plat_get_blocks(self, block_count_per_side, orientation): def _plat_get_blocks(self, block_count_per_side, orientation):
image = QImage(str(self.path)) image = QImage(str(self.path))
image = image.convertToFormat(QImage.Format_RGB888) image = image.convertToFormat(QImage.Format_RGB888)
if type(orientation) == str: if type(orientation) != int:
logging.warning("Orientation for file '%s' was a str '%s', not an int.", str(self.path), orientation) logging.warning(
"Orientation for file '%s' was a %s '%s', not an int.", str(self.path), type(orientation), orientation
)
try: try:
orientation = int(orientation) orientation = int(orientation)
except Exception as e: except Exception as e:
logging.exception( logging.exception(
"Skipping transformation because could not \ "Skipping transformation because could not convert %s to int. %s",
convert str to int. %s", type(orientation),
e, e,
) )
return getblocks(image, block_count_per_side) return getblocks(image, block_count_per_side)