From 22175505f1fb1ec5e3fc1ddb203714d291d803e6 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Sat, 15 Jan 2005 06:13:17 +0000 Subject: [PATCH] formatting --- direct/src/distributed/ClientRepository.py | 10 +--- .../src/distributed/ConnectionRepository.py | 54 +++++++++---------- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/direct/src/distributed/ClientRepository.py b/direct/src/distributed/ClientRepository.py index 9cbde12994..2456f13eaf 100644 --- a/direct/src/distributed/ClientRepository.py +++ b/direct/src/distributed/ClientRepository.py @@ -53,9 +53,7 @@ class ClientRepository(ConnectionRepository.ConnectionRepository): self.heartbeatStarted = 0 self.lastHeartbeat = 0 if wantOtpServer: - ## - ## Top level Interest Manager - ## + # Top level Interest Manager self._interestIdAssign = 1 self._interests = {} @@ -660,11 +658,7 @@ class ClientRepository(ConnectionRepository.ConnectionRepository): self.considerHeartbeat() if wantOtpServer: - ## - ## - ## interest managment - ## - ## + # interest managment def addInterest(self, parentId, zoneId, description): """ Part of the new otp-server code. diff --git a/direct/src/distributed/ConnectionRepository.py b/direct/src/distributed/ConnectionRepository.py index eabd441621..bf442f7b0e 100644 --- a/direct/src/distributed/ConnectionRepository.py +++ b/direct/src/distributed/ConnectionRepository.py @@ -175,21 +175,21 @@ class ConnectionRepository(DirectObject.DirectObject, CConnectionRepository): known. """ -## if self.recorder and self.recorder.isPlaying(): + ## if self.recorder and self.recorder.isPlaying(): -## # If we have a recorder and it's already in playback mode, -## # don't actually attempt to connect to a gameserver since -## # we don't need to. Just let it play back the data. -## self.notify.info("Not connecting to gameserver; using playback data instead.") + ## # If we have a recorder and it's already in playback mode, + ## # don't actually attempt to connect to a gameserver since + ## # we don't need to. Just let it play back the data. + ## self.notify.info("Not connecting to gameserver; using playback data instead.") -## self.connectHttp = 1 -## self.tcpConn = SocketStreamRecorder() -## self.recorder.addRecorder('gameserver', self.tcpConn) + ## self.connectHttp = 1 + ## self.tcpConn = SocketStreamRecorder() + ## self.recorder.addRecorder('gameserver', self.tcpConn) -## self.startReaderPollTask() -## if successCallback: -## successCallback(*successArgs) -## return + ## self.startReaderPollTask() + ## if successCallback: + ## successCallback(*successArgs) + ## return hasProxy = 0 if self.checkHttp(): @@ -252,22 +252,22 @@ class ConnectionRepository(DirectObject.DirectObject, CConnectionRepository): if ch.isConnectionReady(): self.setConnectionHttp(ch) -## if self.recorder: -## # If we have a recorder, we wrap the connect inside a -## # SocketStreamRecorder, which will trap incoming data -## # when the recorder is set to record mode. (It will -## # also play back data when the recorder is in playback -## # mode, but in that case we never get this far in the -## # code, since we just create an empty -## # SocketStreamRecorder without actually connecting to -## # the gameserver.) -## stream = SocketStreamRecorder(self.tcpConn, 1) -## self.recorder.addRecorder('gameserver', stream) + ## if self.recorder: + ## # If we have a recorder, we wrap the connect inside a + ## # SocketStreamRecorder, which will trap incoming data + ## # when the recorder is set to record mode. (It will + ## # also play back data when the recorder is in playback + ## # mode, but in that case we never get this far in the + ## # code, since we just create an empty + ## # SocketStreamRecorder without actually connecting to + ## # the gameserver.) + ## stream = SocketStreamRecorder(self.tcpConn, 1) + ## self.recorder.addRecorder('gameserver', stream) -## # In this case, we pass ownership of the original -## # connection to the SocketStreamRecorder object. -## self.tcpConn.userManagesMemory = 0 -## self.tcpConn = stream + ## # In this case, we pass ownership of the original + ## # connection to the SocketStreamRecorder object. + ## self.tcpConn.userManagesMemory = 0 + ## self.tcpConn = stream self.startReaderPollTask() if successCallback: