Changeset 3233 for pykota

Show
Ignore:
Timestamp:
07/24/07 13:06:37 (17 years ago)
Author:
jerome
Message:

Fixed problem with empty answers.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pksetup

    r3231 r3233  
    230230    def yesno(self, message) :         
    231231        """Asks the end user some question and returns the answer.""" 
    232         answer = raw_input("\n%s ? " % message).strip().upper()[0] 
    233         return answer == 'Y' 
     232        try : 
     233            return raw_input("\n%s ? " % message).strip().upper()[0] == 'Y' 
     234        except IndexError :     
     235            return False 
    234236         
    235237    def confirmCommand(self, message, command, record=True) :