Commit ed4bee53 authored by Damian Johnson's avatar Damian Johnson
Browse files

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
parent 079201c6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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: