[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Possible stacktrace when pausing
commit e2df6f3ee5ad27f40a0e2daed6381a1b56040ff3
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sat Oct 21 11:12:43 2017 -0700
Possible stacktrace when pausing
Interesting graph panel timing bug when draw's concurrently invoked before
we've set stats_paused. Only seen it once, but simple to fix.
File "/home/atagar/Desktop/nyx/nyx/curses.py", line 737, in draw
func(_Subwindow(subwindow_width, subwindow_height, curses_subwindow))
File "/home/atagar/Desktop/nyx/nyx/panel/graph.py", line 569, in _draw
stat = self._stats_paused[self._displayed_stat]
TypeError: 'NoneType' object has no attribute '__getitem__'
---
nyx/panel/graph.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nyx/panel/graph.py b/nyx/panel/graph.py
index 07fc93b..ff110e6 100644
--- a/nyx/panel/graph.py
+++ b/nyx/panel/graph.py
@@ -566,6 +566,9 @@ class GraphPanel(nyx.panel.Panel):
stat = self._stats[self._displayed_stat]
accounting_stats = self._accounting_stats
else:
+ if not self._stats_paused:
+ return # when first paused concurrency could mean this isn't set yet
+
stat = self._stats_paused[self._displayed_stat]
accounting_stats = self._accounting_stats_paused
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits