Changeset 00757a
- Timestamp:
- 11/05/2015 10:23:35 PM (10 years ago)
- Children:
- 83cecc
- Parents:
- 639eef
- git-author:
- Calum Lind <calumlind+deluge@gmail.com> (01/30/2014 11:54:47 AM)
- git-committer:
- Calum Lind <calumlind+deluge@gmail.com> (11/05/2015 10:23:35 PM)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
deluge/core/torrentmanager.py
r639eef r00757a 1044 1044 1045 1045 def on_alert_tracker_error(self, alert): 1046 log.debug("on_alert_tracker_error") 1046 """Alert handler for libtorrent tracker_error_alert""" 1047 error_message = decode_string(alert.msg) 1048 # If alert.msg is empty then it's a '-1' code so fallback to a.e.message. Note that alert.msg 1049 # cannot be replaced by a.e.message because the code is included in the string (for non-'-1'). 1050 if not error_message: 1051 error_message = decode_string(alert.error.message()) 1052 log.debug("Tracker Error Alert: %s [%s]", decode_string(alert.message()), error_message) 1047 1053 try: 1048 1054 torrent = self.torrents[str(alert.handle.info_hash())] 1049 except :1050 return 1051 tracker_status = "%s: %s" % (_("Error"), alert.msg) 1052 torrent.set_tracker_status( tracker_status)1055 except (RuntimeError, KeyError): 1056 return 1057 1058 torrent.set_tracker_status("Error: " + error_message) 1053 1059 1054 1060 def on_alert_storage_moved(self, alert):
Note:
See TracChangeset
for help on using the changeset viewer.