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


Python Score.submit方法代码示例

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


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

示例1: not

# 需要导入模块: from score import Score [as 别名]
# 或者: from score.Score import submit [as 别名]
				# If there are no control types left to check, stop the loop.
				if not ( False in stop_submit.values() ):
					logging.info( "handle_submit: Found no False in " \
						+ "stop_submit, breaking." )
					break
				continue
			
			try:
				name = score["name"]
				comment = score["comment"]
			except KeyError, ex:
				logging.warning( "handle_submit: Got KeyError: %s. " \
					+ "Dictionary: %s", repr( ex ), str( score ) )
				continue
			
			status = Score.submit( name, comment, score_points, score_control,
				location )
			
			submit_count += 1
			
			# If the submit fails because of an error, log as much of it as
			# possible so we maybe can submit it manually later.
			if status == Score.SUBMIT_FAIL:
				json_dump = "<could not dump json>"
				try:
					json_dump = json.dumps( score )
				except:
					pass
				logging.critical( "RequestAndSubmitHandler.handle_submit: " \
					+ "score submit failed. JSON: %s", json_dump)
				logging.info( "Submitted %d of %d scores before the error.",
					submit_count - 1, len( scores ) )
开发者ID:baskus,项目名称:prendo,代码行数:34,代码来源:ras.py


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