Refactored use of iteritems into function to deal with python 2.7 and 3 compatibility.

This commit is contained in:
Markus Lampert
2017-10-22 18:18:10 -07:00
parent bba9499f48
commit d52fc9ef84
6 changed files with 15 additions and 7 deletions

View File

@@ -165,7 +165,7 @@ class ToolLibraryManager():
def tooltableFromAttrs(self, stringattrs):
if stringattrs.get('Version') and 1 == int(stringattrs['Version']):
attrs = {}
for key, val in stringattrs['Tools'].iteritems():
for key, val in PathUtil.keyValueIter(stringattrs['Tools']):
attrs[int(key)] = val
return Path.Tooltable(attrs)
else:
@@ -235,7 +235,7 @@ class ToolLibraryManager():
if tt:
if len(tt.Tools) == 0:
tooldata.append([])
for number, t in tt.Tools.iteritems():
for number, t in PathUtil.keyValueIter(tt.Tools):
itemcheck = QtGui.QStandardItem()
itemcheck.setCheckable(True)