[tor-commits] [nyx/master] Stacktrace if tracker task errors

atagar at torproject.org atagar at torproject.org
Fri Nov 3 19:00:03 UTC 2017


commit a7270a495cd88a9d50815ffba463a6dc25878f26
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Nov 3 11:41:22 2017 -0700

    Stacktrace if tracker task errors
    
    We catch the error, but didn't set is_successful causing a NameError.
---
 nyx/tracker.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nyx/tracker.py b/nyx/tracker.py
index ad033d5..16b3c3d 100644
--- a/nyx/tracker.py
+++ b/nyx/tracker.py
@@ -395,13 +395,13 @@ class Daemon(threading.Thread):
         continue  # done waiting, try again
 
       with self._process_lock:
+        is_successful = False
+
         if self._process_pid is not None:
           try:
             is_successful = self._task(self._process_pid, self._process_name)
           except Exception as exc:
             stem.util.log.notice('BUG: Unexpected exception from %s: %s' % (type(self).__name__, exc))
-        else:
-          is_successful = False
 
         if is_successful:
           self._run_counter += 1





More information about the tor-commits mailing list