mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 23:18:40 +00:00
Fix saving dht state
This commit is contained in:
parent
04d14df8c7
commit
b6822f446a
1 changed files with 2 additions and 2 deletions
|
@ -130,7 +130,7 @@ class Core(component.Component):
|
||||||
def stop(self):
|
def stop(self):
|
||||||
# Save the DHT state if necessary
|
# Save the DHT state if necessary
|
||||||
if self.config["dht"]:
|
if self.config["dht"]:
|
||||||
self.__save_dht_state()
|
self.save_dht_state()
|
||||||
# Save the libtorrent session state
|
# Save the libtorrent session state
|
||||||
self.__save_session_state()
|
self.__save_session_state()
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ class Core(component.Component):
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.warning("Failed to load lt state: %s", e)
|
log.warning("Failed to load lt state: %s", e)
|
||||||
|
|
||||||
def __save_dht_state(self):
|
def save_dht_state(self):
|
||||||
"""Saves the dht state to a file"""
|
"""Saves the dht state to a file"""
|
||||||
try:
|
try:
|
||||||
dht_data = open(deluge.common.get_default_config_dir("dht.state"), "wb")
|
dht_data = open(deluge.common.get_default_config_dir("dht.state"), "wb")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue