Commits

Just van Rossum  committed 8945bb6

Prevent nonsense like:
"from Foundation import NSObject, NSObject, NSObject"

  • Participants
  • Parent commits 574659e

Comments (0)

Files changed (1)

File pyobjc/Lib/PyObjCTools/NibClassBuilder.py

 			framework = _frameworkForClass(super)
 			if not framework:
 				continue  # don't know what to do
-			try:
+			if framework not in frameworks:
+				frameworks[framework] = [super]
+			elif super not in frameworks[framework]:
 				frameworks[framework].append(super)
-			except KeyError:
-				frameworks[framework] = [super]
 
 		items = frameworks.items()
 		if items: