Skip to content

Commit

Permalink
Fixed last broken functional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
strichter committed Jan 13, 2005
1 parent 604ffed commit 4670ed7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions ifacemodule/menu.pt
@@ -0,0 +1,9 @@
<html metal:use-macro="views/apidoc_macros/menu">
<body>

<p metal:fill-slot="post_menu" class="small" i18n:translate="">
Note: These are only interfaces that are registered with the site manager.
</p>

</body>
</html>
5 changes: 2 additions & 3 deletions utilitymodule/__init__.py
Expand Up @@ -83,14 +83,13 @@ def __init__(self, parent, name, interface):

def get(self, key, default=None):
"""See zope.app.container.interfaces.IReadContainer"""
sm = zapi.getSiteManager()
sm = zapi.getGlobalSiteManager()
if key == NONAME:
key = ''
utils = [Utility(self, reg)
for reg in sm.registrations()
if isinstance(reg, UtilityRegistration) and \
if zapi.isinstance(reg, UtilityRegistration) and \
reg.name == key and reg.provided == self.interface]

return utils and utils[0] or default

def items(self):
Expand Down

0 comments on commit 4670ed7

Please sign in to comment.