Browse Source

Do 2to3 suggested changes.

Bentley James Oakes 6 years ago
parent
commit
70df4909c8

+ 2 - 2
kernel/mvk_server/python_runtime/statecharts_core.py

@@ -744,7 +744,7 @@ class RuntimeClassBase(object):
 
 		# decrease timers time
 		next_timers = {}
-		for (key,value) in self.timers.items() :
+		for (key,value) in list(self.timers.items()):
 			time = value - delta
 			if time <= 0.0 :
 				self.addEvent( Event("_" + str(key) + "after"), time)
@@ -762,7 +762,7 @@ class RuntimeClassBase(object):
 			self.processBigStepOutput()
 
 	def inState(self, nodes):
-		for c in self.current_state.values():
+		for c in list(self.current_state.values()):
 			new_nodes = []
 			for n in nodes:
 				if not (n in c):

+ 1 - 1
kernel/mvk_server/python_sccd_compiler/sccd_constructs.py

@@ -861,7 +861,7 @@ class Class(Visitable):
 			if super_class not in checkIt:
 				checkIt.append(super_class)
 			priorityChecker[priority] = checkIt
-		for priority, checkIt in priorityChecker.items():
+		for priority, checkIt in list(priorityChecker.items()):
 			if len(checkIt) > 1:
 				Logger.showWarning("Class <" + self.name + "> inherits from classes <" + ", ".join(checkIt) + "> with same priority <" + str(priority) + ">. Document inheritance order is used.")
 

+ 1 - 1
kernel/mvk_server/python_sccd_compiler/super_class_linker.py

@@ -27,7 +27,7 @@ class SuperClassLinker(Visitor):
 		c.abstract_method_names = getClassAbstractMethodNames(c)
 
 		# check if <super> tags exist for all inherited classes
-		for name,obj in c.super_class_objs.items():
+		for name,obj in list(c.super_class_objs.items()):
 			if obj:
 				if name not in c.constructors[0].super_class_parameters:
 					num_params = len(obj.constructors[0].parameters)