diff options
Diffstat (limited to 'common/javaserver.py')
-rw-r--r-- | common/javaserver.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/javaserver.py b/common/javaserver.py index 15a586b..50bd7f0 100644 --- a/common/javaserver.py +++ b/common/javaserver.py @@ -1,5 +1,5 @@ import sys, os -from cStringIO import StringIO +from io import StringIO import httpserver PLAYERNAMES = ['Bub', 'Bob', 'Boob', 'Beb', @@ -68,11 +68,11 @@ def indexloader(**options): if 'cheat' in options: for opt in options.pop('cheat'): __cheat(opt) - import gamesrv + from . import gamesrv if gamesrv.game is None: indexdata = EMPTY_PAGE else: - names = playernames(options).items() + names = list(playernames(options).items()) indexdata = INDEX_PAGE % { 'title': gamesrv.game.FnDesc, 'width': gamesrv.game.width, @@ -114,16 +114,16 @@ def wav2au(data): return data def sampleloader(code=[], **options): - import gamesrv + from . import gamesrv try: data = wave_cache[code[0]] except KeyError: - for key, snd in gamesrv.samples.items(): + for key, snd in list(gamesrv.samples.items()): if str(getattr(snd, 'code', '')) == code[0]: data = wave_cache[code[0]] = wav2au(snd.read()) break else: - raise KeyError, code[0] + raise KeyError(code[0]) return StringIO(data), 'audio/wav' |