def set_icon(self, icon_path, icon):
        if icon_path:
            icon_path = utils.path_join(self.project_dir(), icon_path)
            if os.path.exists(icon_path):
                if icon_path.endswith('.icns'):
                    pngs = pngs_from_icns(icon_path)
                    if pngs:
                        image = QtGui.QImage.fromData(QtCore.QByteArray(pngs[-1].data), 'PNG')
                    else:
                        return
                else:
                    image = QtGui.QImage(icon_path)
                if image.height() >= image.width():
                    image = image.scaledToWidth(48,
                                        QtCore.Qt.SmoothTransformation)
                else:
                    image = image.scaledToHeight(48,
                                        QtCore.Qt.SmoothTransformation)
                icon.setPixmap(QtGui.QPixmap.fromImage(image))
                icon.setStyleSheet('')
            else:
                icon.setPixmap(None)
                icon.setStyleSheet(self.icon_style)
        else:
            icon.setPixmap(None)
            icon.setStyleSheet(self.icon_style)
dataset/ETHPy150Open jyapayne/Web2Executable/main.py/MainWindow.set_icon/swapped operands of `>=`