~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

  • Committer: Aaron Bentley
  • Date: 2008-11-03 21:52:46 UTC
  • mto: This revision was merged to the branch mainline in revision 3823.
  • Revision ID: aaron@aaronbentley.com-20081103215246-xcpvqnno9d1lhmz4
raise UserAbort instead of doing sys.exit

Show diffs side-by-side

added added

removed removed

Lines of Context:
165
165
        """Prompt the user with a yes/no question.
166
166
 
167
167
        This may be overridden by self.auto.  It may also *set* self.auto.  It
168
 
        may also raise SystemExit.
 
168
        may also raise UserAbort.
169
169
        :param question: The question to ask the user.
170
170
        :return: True or False
171
171
        """
178
178
            self.auto = True
179
179
            return True
180
180
        if char == 'q':
181
 
            sys.exit(0)
 
181
            raise errors.UserAbort()
182
182
        else:
183
183
            return False
184
184