mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-26 11:21:08 +00:00
Fix saving dht state
This commit is contained in:
parent
04d14df8c7
commit
b6822f446a
@ -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…
x
Reference in New Issue
Block a user