[arm/release] fix: crash from esc in interpretor panel prompt

commit ed4bee53a3dd4258ced3168819656bff7d8f211f Author: Damian Johnson <atagar@torproject.org> Date: Wed Sep 28 07:31:43 2011 -0700 fix: crash from esc in interpretor panel prompt When the user presses 'esc' in the interpretor panel prompt the getstr result is None. I didn't account for this, causing a stacktrace. Caught by Sebastian. https://trac.torproject.org/projects/tor/ticket/4098 --- src/cli/interpretorPanel.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/cli/interpretorPanel.py b/src/cli/interpretorPanel.py index 37b9e58..246636c 100644 --- a/src/cli/interpretorPanel.py +++ b/src/cli/interpretorPanel.py @@ -70,6 +70,7 @@ class InterpretorPanel(panel.Panel): inputLine = min(self.maxY - 1, displayLength) inputFormat = getFormat(torInterpretor.INPUT_FORMAT) input = self.getstr(inputLine, xOffset, "", inputFormat, validator = validator) + if input == None: input = "" input, isDone = input.strip(), False if not input:
participants (1)
-
atagar@torproject.org