Fix saving dht state

This commit is contained in:
Andrew Resch 2008-12-20 04:33:47 +00:00
parent 04d14df8c7
commit b6822f446a

View File

@ -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")