Fix base.config error in 1.9

This commit is contained in:
rdb 2015-11-13 19:13:23 +01:00
parent c9921271d6
commit 0869266f1a

View File

@ -63,15 +63,16 @@ def exitfunc():
# *seem* to cause anyone any problems. # *seem* to cause anyone any problems.
class ShowBase(DirectObject.DirectObject): class ShowBase(DirectObject.DirectObject):
config = get_config_showbase()
notify = directNotify.newCategory("ShowBase") notify = directNotify.newCategory("ShowBase")
def __init__(self, fStartDirect = True, windowType = None): def __init__(self, fStartDirect = True, windowType = None):
self.__dev__ = config.GetBool('want-dev', __debug__) self.__dev__ = self.config.GetBool('want-dev', __debug__)
builtins.__dev__ = self.__dev__ builtins.__dev__ = self.__dev__
logStackDump = (config.GetBool('log-stack-dump', False) or logStackDump = (self.config.GetBool('log-stack-dump', False) or
config.GetBool('client-log-stack-dump', False)) self.config.GetBool('client-log-stack-dump', False))
uploadStackDump = config.GetBool('upload-stack-dump', False) uploadStackDump = self.config.GetBool('upload-stack-dump', False)
if logStackDump or uploadStackDump: if logStackDump or uploadStackDump:
ExceptionVarDump.install(logStackDump, uploadStackDump) ExceptionVarDump.install(logStackDump, uploadStackDump)
@ -88,8 +89,6 @@ class ShowBase(DirectObject.DirectObject):
#debug running multiplier #debug running multiplier
self.debugRunningMultiplier = 4 self.debugRunningMultiplier = 4
# Get the dconfig object
self.config = config
# Setup wantVerifyPdb as soon as reasonable: # Setup wantVerifyPdb as soon as reasonable:
Verify.wantVerifyPdb = self.config.GetBool('want-verify-pdb', 0) Verify.wantVerifyPdb = self.config.GetBool('want-verify-pdb', 0)