本文整理汇总了Python中otp.launcher.LauncherBase.LauncherBase.setPandaErrorCode方法的典型用法代码示例。如果您正苦于以下问题:Python LauncherBase.setPandaErrorCode方法的具体用法?Python LauncherBase.setPandaErrorCode怎么用?Python LauncherBase.setPandaErrorCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类otp.launcher.LauncherBase.LauncherBase
的用法示例。
在下文中一共展示了LauncherBase.setPandaErrorCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setPandaErrorCode
# 需要导入模块: from otp.launcher.LauncherBase import LauncherBase [as 别名]
# 或者: from otp.launcher.LauncherBase.LauncherBase import setPandaErrorCode [as 别名]
def setPandaErrorCode(self, code):
self.pandaErrorCode = code
if self.WIN32:
self.notify.info('setting panda error code to %s' % code)
exitCode2exitPage = {
OTPLauncherGlobals.ExitEnableChat: 'chat',
OTPLauncherGlobals.ExitSetParentPassword: 'setparentpassword',
OTPLauncherGlobals.ExitPurchase: 'purchase'}
if code in exitCode2exitPage:
self.setRegistry('EXIT_PAGE', exitCode2exitPage[code])
self.setRegistry(self.PandaErrorCodeKey, 0)
else:
self.setRegistry(self.PandaErrorCodeKey, code)
else:
LauncherBase.setPandaErrorCode(self, code)
示例2: setPandaErrorCode
# 需要导入模块: from otp.launcher.LauncherBase import LauncherBase [as 别名]
# 或者: from otp.launcher.LauncherBase.LauncherBase import setPandaErrorCode [as 别名]
def setPandaErrorCode(self, code):
self.pandaErrorCode = code
if self.WIN32:
self.notify.info("setting panda error code to %s" % code)
exitCode2exitPage = {
OTPLauncherGlobals.ExitEnableChat: "chat",
OTPLauncherGlobals.ExitSetParentPassword: "setparentpassword",
OTPLauncherGlobals.ExitPurchase: "purchase",
}
if code in exitCode2exitPage:
self.setRegistry("EXIT_PAGE", exitCode2exitPage[code])
self.setRegistry(self.PandaErrorCodeKey, 0)
else:
self.setRegistry(self.PandaErrorCodeKey, code)
else:
LauncherBase.setPandaErrorCode(self, code)