psychopy/psychopy — pull request #438 by hoechenberger (2013-11-18 17:02:17+00:00)
Title: BF: Do not try to replace existing intensity if intensity list is empty

Supplying a custom intensity level to QuestHandler.addResponse() did not work before the first call to next(), because in that case the self.intensities list is still emtpy. The call to self.intensities.pop() would thus spawn an error.

Instead, check whether self.intensities is of zero length; and if yes, skips the call to pop().