tabs to spaces

This commit is contained in:
Ondrej Flidr
2021-04-21 15:31:40 +02:00
parent b0b53fc8ef
commit 88bc022a90

View File

@@ -611,17 +611,17 @@ class ShowWorker(QtCore.QThread):
except Exception:
print("AddonManager: Debug: Error retrieving image from", path)
else:
try:
f = open(storename, "wb")
except OSError:
# ecryptfs (and probably not only ecryptfs) has lower length limit for path
storename = storename[-140:]
f = open(storename, "wb")
f.write(imagedata)
f.close()
# resize the image to 300x300px if needed
img = QtGui.QImage(storename)
if (img.width() > 300) or (img.height() > 300):
try:
f = open(storename, "wb")
except OSError:
# ecryptfs (and probably not only ecryptfs) has lower length limit for path
storename = storename[-140:]
f = open(storename, "wb")
f.write(imagedata)
f.close()
# resize the image to 300x300px if needed
img = QtGui.QImage(storename)
if (img.width() > 300) or (img.height() > 300):
pix = QtGui.QPixmap()
pix = pix.fromImage(img.scaled(300, 300,
QtCore.Qt.KeepAspectRatio,