Commit 807086ba authored by Lennart Regebro's avatar Lennart Regebro

Nice ImportError raised if you try to use twisted without having it,

parent fd89cf9b
...@@ -117,7 +117,7 @@ class ZopeStarter: ...@@ -117,7 +117,7 @@ class ZopeStarter:
config = getConfiguration() config = getConfiguration()
if config.twisted_servers: if config.twisted_servers:
if not _use_twisted: if not _use_twisted:
raise ValueError, "You do not have twisted installed." raise ImportError("You do not have twisted installed.")
twisted.internet.reactor.run() twisted.internet.reactor.run()
else: else:
import ZServer import ZServer
......
...@@ -345,4 +345,5 @@ try: ...@@ -345,4 +345,5 @@ try:
pass pass
except ImportError: except ImportError:
class TwistedServerFactory: class TwistedServerFactory:
pass def __init__(self, section):
raise ImportError("You do not have twisted installed.")
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