Browse Source

Added dcFileNames argument to constructors

Josh Yelon 20 years ago
parent
commit
6c3677e07a

+ 2 - 2
direct/src/distributed/ClientRepository.py

@@ -24,7 +24,7 @@ class ClientRepository(ConnectionRepository):
     """
     """
     notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepository")
     notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepository")
 
 
-    def __init__(self):
+    def __init__(self, dcFileNames = None):
         self.dcSuffix=""
         self.dcSuffix=""
         ConnectionRepository.__init__(self, base.config, hasOwnerView=True)
         ConnectionRepository.__init__(self, base.config, hasOwnerView=True)
 
 
@@ -33,7 +33,7 @@ class ClientRepository(ConnectionRepository):
 
 
         self.recorder = base.recorder
         self.recorder = base.recorder
 
 
-        self.readDCFile()
+        self.readDCFile(dcFileNames)
         self.cache=CRCache.CRCache()
         self.cache=CRCache.CRCache()
         self.cacheOwner=CRCache.CRCache()
         self.cacheOwner=CRCache.CRCache()
         self.serverDelta = 0
         self.serverDelta = 0

+ 2 - 2
direct/src/distributed/ServerRepository.py

@@ -17,7 +17,7 @@ class ServerRepository:
 
 
     notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepository")
     notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepository")
 
 
-    def __init__(self, tcpPort, udpPort):
+    def __init__(self, tcpPort, udpPort, dcFileNames = None):
         self.qcm = QueuedConnectionManager()
         self.qcm = QueuedConnectionManager()
         self.qcl = QueuedConnectionListener(self.qcm, 0)
         self.qcl = QueuedConnectionListener(self.qcm, 0)
         self.qcr = QueuedConnectionReader(self.qcm, 0)
         self.qcr = QueuedConnectionReader(self.qcm, 0)
@@ -41,7 +41,7 @@ class ServerRepository:
         self.ZonetoDOIDs = {}
         self.ZonetoDOIDs = {}
         self.dcFile = DCFile()
         self.dcFile = DCFile()
         self.dcSuffix = ''
         self.dcSuffix = ''
-        self.readDCFile()
+        self.readDCFile(dcFileNames)
 
 
     def importModule(self, dcImports, moduleName, importSymbols):
     def importModule(self, dcImports, moduleName, importSymbols):
         """ Imports the indicated moduleName and all of its symbols
         """ Imports the indicated moduleName and all of its symbols