[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py Fix Zope 3 startup problem.

Philipp von Weitershausen philikon at philikon.de
Tue Apr 4 12:13:20 EDT 2006


Log message for revision 66403:
  Fix Zope 3 startup problem.
  This asObject stuff is pretty lame. I will suggest a different solution to this.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py	2006-04-04 16:08:51 UTC (rev 66402)
+++ Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py	2006-04-04 16:13:19 UTC (rev 66403)
@@ -105,6 +105,12 @@
     utility = utility_factory()
     name = chooser.chooseName(utility_type, utility)
     package[name] = utility
+
+    # the utility might have been location-proxied; we need the name
+    # information (__name__) so let's get it back again from the
+    # container
+    utility = package[name]
+
     # Set additional attributes on the utility
     for k, v in kw.iteritems():
         setattr(utility, k, v)



More information about the Zope3-Checkins mailing list