monast.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:monast 作者: dagmoller 项目源码 文件源码
def _processClientActions(self):
        log.debug("Processing Client Actions...")
        while self.clientActions:
            session, action = self.clientActions.pop(0)
            servername      = action['server'][0]
            role, handler   = self.actionHandlers.get(action['action'][0], (None, None))
            if handler:
                if self.authRequired:
                    if role in self.authUsers[session.username].servers.get(servername):
                        reactor.callWhenRunning(handler, session, action)
                    else:
                        self.http._addUpdate(servername = servername, sessid = session.uid, action = "RequestError", message = "You do not have permission to execute this action.")
                else:
                    reactor.callWhenRunning(handler, session, action)
            else:
                log.error("ClientActionHandler for action %s does not exixts..." % action['action'][0])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号