Commit 1e235e70 authored by Michael Howitz's avatar Michael Howitz

Don't bail on WindowsError not existing on non-windows systems.

Discussion see https://github.com/zopefoundation/Zope/commit/87c5992e7e40604df206bb713e42bafd5919fe64
parent 34da9ede
......@@ -27,6 +27,12 @@ from ZConfig.components.logger import loghandler
from zope.event import notify
from zope.processlifetime import ProcessStarting
try:
IO_ERRORS = (IOError, WindowsError)
except NameError:
IO_ERRORS = (IOError,)
logger = logging.getLogger("Zope")
started = False
......@@ -283,7 +289,7 @@ class ZopeStarter:
lock_file(self.lockfile)
self.lockfile.write(str(os.getpid()))
self.lockfile.flush()
except (IOError, WindowsError):
except IO_ERRORS:
pass
def makePidFile(self):
......@@ -295,7 +301,7 @@ class ZopeStarter:
f = open(self.cfg.pid_filename, 'w')
f.write(str(os.getpid()))
f.close()
except (IOError, WindowsError):
except IO_ERRORS:
pass
def unlinkPidFile(self):
......
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