Removed 'with' statement; it's available in Python2.5, but one needs to use the future import to do that, so easiest to remove it. Resolves issue 230.

This commit is contained in:
Griatch 2012-05-04 10:03:41 +02:00
parent 7058b9f210
commit c49fbd7d99
4 changed files with 13 additions and 9 deletions

View file

@ -113,9 +113,12 @@ class AmpClientFactory(protocol.ReconnectingClientFactory):
"""
Called when the AMP connection to the MUD server is lost.
"""
if not hasattr(self, "server_restart_mode"):
if hasattr(self, "server_restart_mode"):
self.maxDelay = 1
else:
# Don't translate this; avoiding loading django on portal side.
self.portal.sessions.announce_all(" Portal lost connection to Server.")
self.maxDelay = 10
self.portal.sessions.announce_all(" ... Portal lost connection to Server.")
protocol.ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
def clientConnectionFailed(self, connector, reason):