本文整理汇总了Python中TriblerGUI.tribler_request_manager.TriblerRequestManager.get_message_from_error方法的典型用法代码示例。如果您正苦于以下问题:Python TriblerRequestManager.get_message_from_error方法的具体用法?Python TriblerRequestManager.get_message_from_error怎么用?Python TriblerRequestManager.get_message_from_error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TriblerGUI.tribler_request_manager.TriblerRequestManager
的用法示例。
在下文中一共展示了TriblerRequestManager.get_message_from_error方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: received_settings
# 需要导入模块: from TriblerGUI.tribler_request_manager import TriblerRequestManager [as 别名]
# 或者: from TriblerGUI.tribler_request_manager.TriblerRequestManager import get_message_from_error [as 别名]
def received_settings(self, settings):
if not settings:
return
# If we cannot receive the settings, stop Tribler with an option to send the crash report.
if 'error' in settings:
raise RuntimeError(TriblerRequestManager.get_message_from_error(settings))
self.tribler_settings = settings['settings']
# Set the video server port
self.video_player_page.video_player_port = settings["ports"]["video_server~port"]
# Disable various components based on the settings
if not self.tribler_settings['video_server']['enabled']:
self.left_menu_button_video_player.setHidden(True)
self.downloads_creditmining_button.setHidden(not self.tribler_settings["credit_mining"]["enabled"])
self.downloads_all_button.click()
# process pending file requests (i.e. someone clicked a torrent file when Tribler was closed)
# We do this after receiving the settings so we have the default download location.
self.process_uri_request()
# Set token balance refresh timer and load the token balance
self.token_refresh_timer = QTimer()
self.token_refresh_timer.timeout.connect(self.load_token_balance)
self.token_refresh_timer.start(60000)
self.load_token_balance()