Commits

Anonymous committed 57eae48

ZCML tests pass

  • Participants
  • Parent commits 2ddf05b

Comments (0)

Files changed (2)

File conex/src/conex/types/factory.py

         if implementation_dotted_name:
             if isinstance(implementation_dotted_name, str):
                 implementation = self._resolve_dotted_name(implementation_dotted_name)
+                class_name = implementation_dotted_name.split(".")[-1]
             else:
                 implementation = implementation_dotted_name
-            class_name = implementation_dotted_name.split(".")[-1]
+                class_name = implementation.__name__
             self.known_classes[unicode(class_name)] = implementation
         else:
             self._make_type(schema)

File conex/src/conex/types/zcml.py

         required=False)
 
 def _register(schema, implementation=None):
-    factory = getUtility(IConcaveTypesFactory, u"conex.TypesFactory")
+    factory = getUtility(IConcaveTypesFactory, u"conex.TypesFactory")()
     factory.register_type(schema, implementation)
 
 def register_type(_context, schema, implementation=None):