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):

View file

@ -4,8 +4,8 @@ General helper functions that don't fit neatly under any given category.
They provide some useful string and conversion methods that might
be of use when designing your own game.
"""
from inspect import ismodule
import os, sys, imp, types, math
import textwrap