From 58388419fb79fe5ad152ef5463571e24867fe705 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Fri, 30 Oct 2015 18:27:38 +0000 Subject: [PATCH] [Core] Fix mistake in clear_forced_error_state --- deluge/core/torrent.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 4583c6611..789b1c133 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -670,18 +670,19 @@ class Torrent(object): self.handle.pause() self.update_state() - def clear_forced_error_state(self): + def clear_forced_error_state(self, update_state=True): if not self.forced_error: return if self.forced_error.restart_to_resume: log.error("Restart deluge to clear this torrent error") - if not self.force_error.was_paused and self.options["auto_managed"]: + if not self.forced_error.was_paused and self.options["auto_managed"]: self.handle.auto_managed(True) - self.force_error = None - self.set_status_message() - self.update_state() + self.forced_error = None + self.set_status_message("OK") + if update_state: + self.update_state() def get_eta(self): """Get the ETA for this torrent.