Browse Source

Pass cluster mode in server startup command instead of using config variable

Mark Mine 23 years ago
parent
commit
314921c7da
1 changed files with 7 additions and 1 deletions
  1. 7 1
      direct/src/directtools/DirectSession.py

+ 7 - 1
direct/src/directtools/DirectSession.py

@@ -173,7 +173,13 @@ class DirectSession(PandaObject):
             import TkGlobal
             self.panel = DirectSessionPanel(parent = tkroot)
 
-        self.clusterMode = base.config.GetString("cluster-mode", '')
+        try:
+            # Has the clusterMode been set externally (i.e. via the
+            # bootstrap application?
+            self.clusterMode = clusterMode
+        except NameError:
+            # Has the clusterMode been set via a config variable?
+            self.clusterMode = base.config.GetString("cluster-mode", '')
         if self.clusterMode == 'client':
             self.cluster = createClusterClient()
         elif self.clusterMode == 'server':