Changeset 3026

Show
Ignore:
Timestamp:
02/07/08 10:03:16 (10 months ago)
Author:
vivainio
Message:

new attempt at fixing indexerror if input_hist is lacking

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ipython/trunk/IPython/Prompts.py

    r3025 r3026  
    536536 
    537537            # do not print output if input ends in ';' 
    538             if self.prompt_count and self.input_hist[self.prompt_count].endswith(';\n'): 
    539                 return 
     538            try: 
     539                if self.input_hist[self.prompt_count].endswith(';\n'): 
     540                    return 
     541            except IndexError: 
     542                # some uses of ipshellembed may fail here 
     543                pass 
    540544            # don't use print, puts an extra space 
    541545            cout_write(self.output_sep)