mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
[Core] Remove return true for timer from save_state
Obsolete code for old gobject timer
This commit is contained in:
parent
1ff189c63a
commit
ed48c4a0c5
1 changed files with 1 additions and 7 deletions
|
@ -647,12 +647,7 @@ class TorrentManager(component.Component):
|
||||||
return state
|
return state
|
||||||
|
|
||||||
def save_state(self):
|
def save_state(self):
|
||||||
"""Save the state of the TorrentManager to the torrents.state file.
|
"""Save the state of the TorrentManager to the torrents.state file."""
|
||||||
|
|
||||||
Returns:
|
|
||||||
bool: Always returns True so that the timer thread will continue.
|
|
||||||
|
|
||||||
"""
|
|
||||||
state = self.create_state()
|
state = self.create_state()
|
||||||
filename = "torrents.state"
|
filename = "torrents.state"
|
||||||
filepath = os.path.join(self.state_dir, filename)
|
filepath = os.path.join(self.state_dir, filename)
|
||||||
|
@ -682,7 +677,6 @@ class TorrentManager(component.Component):
|
||||||
if os.path.isfile(filepath_bak):
|
if os.path.isfile(filepath_bak):
|
||||||
log.info("Restoring backup of %s from: %s", filename, filepath_bak)
|
log.info("Restoring backup of %s from: %s", filename, filepath_bak)
|
||||||
os.rename(filepath_bak, filepath)
|
os.rename(filepath_bak, filepath)
|
||||||
return True
|
|
||||||
|
|
||||||
def save_resume_data(self, torrent_ids=None, flush_disk_cache=False):
|
def save_resume_data(self, torrent_ids=None, flush_disk_cache=False):
|
||||||
"""Saves torrents resume data.
|
"""Saves torrents resume data.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue