[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tor-cvs
Subject:    [tor-commits] [arm/release] fix: crash from esc in interpretor
From:       atagar () torproject ! org
Date:       2011-09-29 15:50:12
Message-ID: 20110929155012.563505DE4C () cupani ! torproject ! org
[Download RAW message or body]

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:



_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic