From 7c2296752153ef4133b5f863c5327cfe12b3a2b9 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Tue, 15 Oct 2013 09:48:06 -0600 Subject: [PATCH] Fix AIR dbInterface's notify severities/parameters. --- .../distributed/AstronDatabaseInterface.py | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/direct/src/distributed/AstronDatabaseInterface.py b/direct/src/distributed/AstronDatabaseInterface.py index 120bf85e3f..c8eac1096b 100644 --- a/direct/src/distributed/AstronDatabaseInterface.py +++ b/direct/src/distributed/AstronDatabaseInterface.py @@ -41,9 +41,8 @@ class AstronDatabaseInterface: for k,v in fields.items(): field = dclass.getFieldByName(k) if not field: - self.notify.warning('Creation request for %s object contains ' - 'invalid field named %s' % (dclass.getName(), k)) - continue + self.notify.error('Creation request for %s object contains ' + 'invalid field named %s' % (dclass.getName(), k)) fieldPacker.rawPackUint16(field.getNumber()) fieldPacker.beginPack(field) @@ -100,7 +99,7 @@ class AstronDatabaseInterface: if ctx not in self._callbacks: self.notify.warning('Received unexpected DBSERVER_OBJECT_GET_ALL_RESP' - ' (ctx %d, doId %d)' % (ctx, doId)) + ' (ctx %d)' % (ctx)) return try: @@ -112,10 +111,8 @@ class AstronDatabaseInterface: dclass = self.air.dclassesByNumber.get(dclassId) if not dclass: - self.notify.warning('Received bad dclass %d for %d in' - ' DBSERVER_OBJECT_GET_ALL_RESP' % (dclassId, doId)) - self._callbacks[ctx](None, None) - return + self.notify.error('Received bad dclass %d in' + ' DBSERVER_OBJECT_GET_ALL_RESP' % (dclassId)) fieldCount = di.getUint16() unpacker = DCPacker() @@ -126,11 +123,8 @@ class AstronDatabaseInterface: field = dclass.getFieldByIndex(fieldId) if not field: - self.notify.warning('Received bad field %d in query for' - ' %s(%d)' % (fieldId, dclass.getName(), - doId)) - self._callbacks[ctx](None, None) - return + self.notify.error('Received bad field %d in query for' + ' %s object' % (fieldId, dclass.getName())) unpacker.beginUnpack(field) @@ -175,9 +169,8 @@ class AstronDatabaseInterface: for k,v in newFields.items(): field = dclass.getFieldByName(k) if not field: - self.notify.warning('Update for %s(%d) object contains invalid' - ' field named %s' % (dclass.getName(), doId, k)) - continue + self.notify.error('Update for %s(%d) object contains invalid' + ' field named %s' % (dclass.getName(), doId, k)) fieldPacker.rawPackUint16(field.getNumber())