def CallManagerFunc(sKey, sFunc, *args): obj = GetGlobalManager(sKey) oFunc = getattr(obj, sFunc, None) if not oFunc: pubdefines.LogFile("err", "%s %s is not exist" % (sKey, sFunc)) return None return oFunc(*args)
def LogFile(self, sMsg): pubdefines.LogFile("dbmanager", sMsg)
def DBErr(self, e): iErrNum = e.args[0] sErrMsg = e.args[1] pubdefines.LogFile("dbmanager", "%s" % sErrMsg) return iErrNum
def Disconnected(self, iUID, sReaon=""): pubdefines.LogFile("clientsocket", "%d disconnected reason is %s" % (iUID, sReaon)) oClient = self.GetItem(iUID) oClient.Release() self.DelItem(iUID)