本文整理汇总了Python中pyload.webui.PYLOAD.isCaptchaWaiting方法的典型用法代码示例。如果您正苦于以下问题:Python PYLOAD.isCaptchaWaiting方法的具体用法?Python PYLOAD.isCaptchaWaiting怎么用?Python PYLOAD.isCaptchaWaiting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyload.webui.PYLOAD
的用法示例。
在下文中一共展示了PYLOAD.isCaptchaWaiting方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: pre_processor
# 需要导入模块: from pyload.webui import PYLOAD [as 别名]
# 或者: from pyload.webui.PYLOAD import isCaptchaWaiting [as 别名]
def pre_processor():
s = request.environ.get('beaker.session')
user = parse_userdata(s)
perms = parse_permissions(s)
status = {}
captcha = False
update = False
plugins = False
if user["is_authenticated"]:
status = PYLOAD.statusServer()
info = PYLOAD.getInfoByPlugin("UpdateManager")
captcha = PYLOAD.isCaptchaWaiting()
# check if update check is available
if info:
if info["pyload"] == "True":
update = info["version"]
if info["plugins"] == "True":
plugins = True
return {"user": user,
'status': status,
'captcha': captcha,
'perms': perms,
'url': request.url,
'update': update,
'plugins': plugins}
示例2: status
# 需要导入模块: from pyload.webui import PYLOAD [as 别名]
# 或者: from pyload.webui.PYLOAD import isCaptchaWaiting [as 别名]
def status():
try:
status = toDict(PYLOAD.statusServer())
status['captcha'] = PYLOAD.isCaptchaWaiting()
return status
except Exception:
return HTTPError()