[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit a7270a495cd88a9d50815ffba463a6dc25878f26
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits