Commit 28213fd8 authored by Ross Patterson's avatar Ross Patterson

Fix lock file cleanup if there's an error early in startup.

parent 2a58c32e
...@@ -8,6 +8,8 @@ http://docs.zope.org/zope2/releases/. ...@@ -8,6 +8,8 @@ http://docs.zope.org/zope2/releases/.
2.13.15 (unreleased) 2.13.15 (unreleased)
-------------------- --------------------
- Fix lock file cleanup if there's an error early in startup.
2.13.14 (2012-05-31) 2.13.14 (2012-05-31)
-------------------- --------------------
......
...@@ -303,7 +303,7 @@ class ZopeStarter: ...@@ -303,7 +303,7 @@ class ZopeStarter:
pass pass
def unlinkLockFile(self): def unlinkLockFile(self):
if not self.cfg.zserver_read_only_mode: if not self.cfg.zserver_read_only_mode and hasattr(self, 'lockfile'):
try: try:
self.lockfile.close() self.lockfile.close()
os.unlink(self.cfg.lock_filename) os.unlink(self.cfg.lock_filename)
......
...@@ -20,8 +20,9 @@ def run(): ...@@ -20,8 +20,9 @@ def run():
starter.setConfiguration(opts.configroot) starter.setConfiguration(opts.configroot)
try: try:
starter.prepare() starter.prepare()
finally: except:
starter.shutdown() starter.shutdown()
raise
starter.run() starter.run()
def configure(configfile): def configure(configfile):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment