##// END OF EJS Templates
do not crash if prompt_count is 0 (detected with leo ipython plugin)
vivainio -
Show More
@@ -2,7 +2,7 b''
2 """
2 """
3 Classes for handling input/output prompts.
3 Classes for handling input/output prompts.
4
4
5 $Id: Prompts.py 2928 2008-01-10 14:30:51Z vivainio $"""
5 $Id: Prompts.py 3025 2008-02-07 15:45:43Z vivainio $"""
6
6
7 #*****************************************************************************
7 #*****************************************************************************
8 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
8 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
@@ -535,7 +535,7 b' class CachedOutput:'
535 # first handle the cache and counters
535 # first handle the cache and counters
536
536
537 # do not print output if input ends in ';'
537 # do not print output if input ends in ';'
538 if self.input_hist[self.prompt_count].endswith(';\n'):
538 if self.prompt_count and self.input_hist[self.prompt_count].endswith(';\n'):
539 return
539 return
540 # don't use print, puts an extra space
540 # don't use print, puts an extra space
541 cout_write(self.output_sep)
541 cout_write(self.output_sep)
General Comments 0
You need to be logged in to leave comments. Login now