[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

@@ -24,7 +24,6 @@ import FreeCAD
import Draft
import ArchCommands
import DraftVecUtils
import sys
import ArchIFC
import tempfile
import os
@@ -40,8 +39,7 @@ else:
def QT_TRANSLATE_NOOP(ctxt,txt):
return txt
# \endcond
if sys.version_info.major >= 3:
unicode = str
unicode = str
## @package ArchBuildingPart
# \ingroup ARCH
@@ -758,10 +756,7 @@ class ViewProviderBuildingPart:
elif prop == "FontName":
if hasattr(vobj,"FontName") and hasattr(self,"fon"):
if vobj.FontName:
if sys.version_info.major < 3:
self.fon.name = vobj.FontName.encode("utf8")
else:
self.fon.name = vobj.FontName
self.fon.name = vobj.FontName
elif prop in ["FontSize","DisplayOffset","OriginOffset"]:
if hasattr(vobj,"FontSize") and hasattr(vobj,"DisplayOffset") and hasattr(vobj,"OriginOffset") and hasattr(self,"fon"):
fs = vobj.FontSize.Value