Fix "AttributeError: Game instance has no attribute 'requestHandler'"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4366 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
7a08a17a6b
commit
4108ad54fc
|
@ -108,7 +108,7 @@ class GameDB:
|
|||
class Game:
|
||||
""" class for a single game """
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, requestHandler):
|
||||
self.description = None
|
||||
self.size = None
|
||||
self.flags = None
|
||||
|
@ -119,6 +119,7 @@ class Game:
|
|||
self.user2 = None
|
||||
self.user3 = None
|
||||
self.user4 = None
|
||||
self.requestHandler = requestHandler
|
||||
|
||||
def setData(self, d):
|
||||
""" decode the c-structure from the server into local varialbles"""
|
||||
|
@ -178,7 +179,7 @@ class RequestHandler(SocketServer.ThreadingMixIn, SocketServer.StreamRequestHand
|
|||
logging.debug("Adding gameserver.")
|
||||
try:
|
||||
# create a game object
|
||||
g=Game()
|
||||
g = Game(self)
|
||||
|
||||
# put it in the database
|
||||
gdb.addGame(g)
|
||||
|
|
Loading…
Reference in New Issue