[Arch] remove unneeded checks for Python 3

since we only support Python >=3, these checks can go
This commit is contained in:
Uwe
2022-07-31 05:35:58 +02:00
parent 9884073276
commit 04570f81cc
10 changed files with 18 additions and 77 deletions

View File

@@ -31,7 +31,7 @@ __title__ = "FreeCAD Arch Component"
__author__ = "Yorik van Havre"
__url__ = "https://www.freecadweb.org"
import FreeCAD,Draft,ArchCommands,sys,ArchIFC
import FreeCAD,Draft,ArchCommands,ArchIFC
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtGui,QtCore
@@ -2085,11 +2085,7 @@ class ComponentTaskPanel:
if not ptype.startswith("Ifc"):
ptype = self.ptypes[self.plabels.index(ptype)]
pvalue = self.ifcModel.item(row,0).child(childrow,2).text()
if sys.version_info.major >= 3:
ifcdict[prop] = pset+";;"+ptype+";;"+pvalue
else:
# keys cannot be unicode
ifcdict[prop.encode("utf8")] = pset+";;"+ptype+";;"+pvalue
ifcdict[prop] = pset+";;"+ptype+";;"+pvalue
ifcData = self.obj.IfcData
ifcData["IfcUID"] = self.ifcEditor.labelUUID.text()
ifcData["FlagForceBrep"] = str(self.ifcEditor.checkBrep.isChecked())