| | 80 | if name == 'Zope' and debugger.ChannelClosed(): |
| | 81 | # We are about to run a Zope module, but we have no IDE |
| | 82 | # connection. See if we need to auto-reconnect, and do |
| | 83 | # so if necessary. |
| | 84 | import Zope |
| | 85 | from config import CONTROL_PANEL_ID |
| | 86 | odb = Zope.bobo_application() |
| | 87 | try: |
| | 88 | wds = odb.Control_Panel._getOb(CONTROL_PANEL_ID) |
| | 89 | ari = wds.auto_reconnect_ide |
| | 90 | finally: |
| | 91 | # Make sure we close the connection, otherwise |
| | 92 | # we'll run out. |
| | 93 | odb._p_jar.close() |
| | 94 | if ari: |
| | 95 | # Wrap in bare accept and raise to avoid exception |
| | 96 | # detection. |
| | 97 | try: |
| | 98 | debugger.ConnectToClient() |
| | 99 | except: |
| | 100 | raise |