Fix some tests in test_core
This commit is contained in:
parent
7e7da94a6e
commit
bc028998d7
@ -226,7 +226,9 @@ class TorrentManager(component.Component):
|
|||||||
# torrent_id is removed from it in self.on_alert_torrent_paused()
|
# torrent_id is removed from it in self.on_alert_torrent_paused()
|
||||||
# before we call self.save_resume_data() here.
|
# before we call self.save_resume_data() here.
|
||||||
save_resume_data_list = []
|
save_resume_data_list = []
|
||||||
for key in self.torrents.keys():
|
for key in self.torrents:
|
||||||
|
# Stop the status cleanup LoopingCall here
|
||||||
|
self.torrents[key].prev_status_cleanup_loop.stop()
|
||||||
if not self.torrents[key].handle.is_paused():
|
if not self.torrents[key].handle.is_paused():
|
||||||
# We set auto_managed false to prevent lt from resuming the torrent
|
# We set auto_managed false to prevent lt from resuming the torrent
|
||||||
self.torrents[key].handle.auto_managed(False)
|
self.torrents[key].handle.auto_managed(False)
|
||||||
@ -546,6 +548,9 @@ class TorrentManager(component.Component):
|
|||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.warning("Unable to remove copy torrent file: %s", e)
|
log.warning("Unable to remove copy torrent file: %s", e)
|
||||||
|
|
||||||
|
# Stop the looping call
|
||||||
|
self.torrents[torrent_id].prev_status_cleanup_loop.stop()
|
||||||
|
|
||||||
# Remove the torrent from deluge's session
|
# Remove the torrent from deluge's session
|
||||||
try:
|
try:
|
||||||
del self.torrents[torrent_id]
|
del self.torrents[torrent_id]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user