Skip to content

Commit

Permalink
compatibility with zope2 and zope4
Browse files Browse the repository at this point in the history
  • Loading branch information
jmevissen committed Oct 3, 2018
1 parent be2a02b commit 1d9cf00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plone/app/debugtoolbar/browser/global.pt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<td i18n:translate="">Process</td>
<td tal:content="view/appInfo/process_id" />
</tr>
<tr>
<tr tal:condition="view/appInfo/process_time|nothing">
<td i18n:translate="">Running for</td>
<td tal:content="view/appInfo/process_time" />
</tr>
Expand Down
6 changes: 5 additions & 1 deletion src/plone/app/debugtoolbar/browser/global.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def update(self):

self.servers = config.servers

self.appInfo = self.context.getPhysicalRoot()['Control_Panel']
try:
self.appInfo = self.context.getPhysicalRoot()['Control_Panel']
except KeyError:
# bbb import for Zope2
self.appInfo = self.context.getPhysicalRoot().Control_Panel

self.databases = []
paths = dict([(x[1], x[0],) for x in config.dbtab.mount_paths.items()])
Expand Down

0 comments on commit 1d9cf00

Please sign in to comment.