collective/sauna.reload — pull request #14 by sunew (2014-10-19 10:58:50+00:00)
Title: In Zope version >= 2.13.19 the storage is explicitly closed on shutdown....

... This caused an attribute error on reload, since the _rpc_mgr was None. Test for is_connected before closing connection and cache.

The error happening on every reload for Zope>= 2.13.19, plone versions 4.2 and above:

2014-10-19 12:14:08 INFO Z2 Shutting down
2014-10-19 12:14:08 INFO ZEO.ClientStorage zeostorage Disconnected from storage: "('localhost', 50001)"
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/work/tools/plone4/plone4.3-std/mr-developer-src/sauna.reload/sauna/reload/forkloop.py", line 249, in _childExitHandler
self.database.prepareForReload()
File "/work/tools/plone4/plone4.3-std/mr-developer-src/sauna.reload/sauna/reload/adapters.py", line 41, in prepareForReload
return self.context.prepareForReload()
File "/work/tools/plone4/plone4.3-std/mr-developer-src/sauna.reload/sauna/reload/adapters.py", line 120, in prepareForReload
_rpc_mgr.close()
AttributeError: 'NoneType' object has no attribute 'close'

Reload was still working - this bug just made a lot of noise.