当前位置: 首页>>代码示例>>Python>>正文


Python ObjectDict.return_message方法代码示例

本文整理汇总了Python中tornado.util.ObjectDict.return_message方法的典型用法代码示例。如果您正苦于以下问题:Python ObjectDict.return_message方法的具体用法?Python ObjectDict.return_message怎么用?Python ObjectDict.return_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tornado.util.ObjectDict的用法示例。


在下文中一共展示了ObjectDict.return_message方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: wrapper

# 需要导入模块: from tornado.util import ObjectDict [as 别名]
# 或者: from tornado.util.ObjectDict import return_message [as 别名]
 def wrapper(*args, **kwargs):
     try:
         return func(*args, **kwargs)
     except Exception as e:
         logger.info(args)
         logger.info(kwargs)
         logger.info("====[EXIT]====")
         # svc = args[0]
         # # from code import interact
         # # interact(local=locals())
         # if isinstance(e, Exception):
         #     svc.db.rollback()
         #     logger.info("====[ROLLBACK]====")
         # else:
         #     svc.db.commit()
         #     # svc.db.flush()
         #     logger.info("====[COMMIT]====")
         # svc.db.remove()
         # svc.db.close()
         logger.info("====[CLOSE]====")
         # svc = args[0]
         # svc.db.close()
         # svc.db.remove()
         # logger.info(svc.db)
         logThrown()
         data = ObjectDict()
         data.return_code = ERROR.system_err.errcode
         data.return_message = e.__unicode__()
         data.data = None
         return data
开发者ID:finalbattle,项目名称:cloud-check,代码行数:32,代码来源:config.py

示例2: failures

# 需要导入模块: from tornado.util import ObjectDict [as 别名]
# 或者: from tornado.util.ObjectDict import return_message [as 别名]
 def failures(self, failure_list, data=None):
     result = ObjectDict()
     result.return_code = ERROR.database_save_err.errcode
     # result.return_message = u",".join(["(%s)%s" % (f.return_code, f.return_message) for f in failure_list])
     result.return_message = u"\n,".join([f for f in failure_list])
     result.return_messages = failure_list
     result.data = data
     return result
开发者ID:finalbattle,项目名称:cloud-check,代码行数:10,代码来源:base.py

示例3: failure

# 需要导入模块: from tornado.util import ObjectDict [as 别名]
# 或者: from tornado.util.ObjectDict import return_message [as 别名]
 def failure(self, return_code=0, return_message="", data=None):
     result = ObjectDict()
     result.return_code = return_code
     result.return_message = return_message
     result.data = data
     return result
开发者ID:finalbattle,项目名称:cloud-check,代码行数:8,代码来源:handlers.py

示例4: failure

# 需要导入模块: from tornado.util import ObjectDict [as 别名]
# 或者: from tornado.util.ObjectDict import return_message [as 别名]
 def failure(self, error_obj, data=None):
     result = ObjectDict()
     result.return_code = error_obj.errcode
     result.return_message = error_obj.errvalue
     result.data = data
     return result
开发者ID:finalbattle,项目名称:cloud-check,代码行数:8,代码来源:base.py

示例5: success

# 需要导入模块: from tornado.util import ObjectDict [as 别名]
# 或者: from tornado.util.ObjectDict import return_message [as 别名]
 def success(self, data=None):
     result = ObjectDict()
     result.return_code = 0
     result.return_message = u""
     result.data = data
     return result
开发者ID:finalbattle,项目名称:cloud-check,代码行数:8,代码来源:base.py


注:本文中的tornado.util.ObjectDict.return_message方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。