Draft: Fixed py3 compatibility issues
This commit is contained in:
@@ -118,8 +118,9 @@ class todo:
|
||||
todo.itinerary = []
|
||||
if todo.commitlist:
|
||||
for name,func in todo.commitlist:
|
||||
if isinstance(name,unicode):
|
||||
name = name.encode("utf8")
|
||||
if sys.version_info.major < 3:
|
||||
if isinstance(name,unicode):
|
||||
name = name.encode("utf8")
|
||||
#print("debug: committing ",str(name))
|
||||
try:
|
||||
name = str(name)
|
||||
|
||||
@@ -538,8 +538,9 @@ class Line(Creator):
|
||||
self.ui.wireUi(name)
|
||||
else:
|
||||
self.ui.lineUi(name)
|
||||
if isinstance(self.featureName,unicode):
|
||||
self.featureName = self.featureName.encode("utf8")
|
||||
if sys.version_info.major < 3:
|
||||
if isinstance(self.featureName,unicode):
|
||||
self.featureName = self.featureName.encode("utf8")
|
||||
self.obj=self.doc.addObject("Part::Feature",self.featureName)
|
||||
# self.obj.ViewObject.Selectable = False
|
||||
Draft.formatObject(self.obj)
|
||||
|
||||
Reference in New Issue
Block a user