Ticket #11310: 11310_psage.patch

File 11310_psage.patch, 878 bytes (added by jdemeyer, 11 years ago)

Additional patch

  • sage/interfaces/psage.py

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1343912130 -7200
    # Node ID a2f5016de6871c9873b9b8862eba5feed59bcb01
    # Parent  83300b24f3c9b8a965e06d4f2095af4a4b5e1cc3
    Check for ExceptionPexpect instead of StandardError
    
    diff --git a/sage/interfaces/psage.py b/sage/interfaces/psage.py
    a b  
    115115            self.expect().expect(self._prompt)
    116116        try:
    117117            return Sage.eval(self, x, **kwds)
    118         except StandardError:
     118        except ExceptionPexpect:
    119119            return "<<currently executing code>>"
    120120           
    121121
     
    125125        """
    126126        try:
    127127            return self.eval('print %s'%var)
    128         except StandardError:
     128        except ExceptionPexpect:
    129129            return "<<currently executing code>>"
    130130
    131131    def set(self, var, value):