explain the buried reactor import, just in case

This commit is contained in:
Jean-Paul Calderone 2018-06-08 13:13:26 -04:00
parent 2c38b148bf
commit 97e0ad627b

View File

@ -329,6 +329,8 @@ def foolscapEndpointForPortNumber(portnum):
Foolscap-compatible endpoint object.
"""
if portnum is None:
# Bury this reactor import here to minimize the chances of it having
# the effect of installing the default reactor.
from twisted.internet import reactor
if IReactorSocket.providedBy(reactor):
# On POSIX we can take this very safe approach of binding the