python 2.6-ism in grin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

python 2.6-ism in grin

David Cournapeau
Hi,

I noticed a small issue in grin preventing me from using it on python 2.5:

Index: grin.py
===================================================================
--- grin.py (revision 80)
+++ grin.py (working copy)
@@ -1029,7 +1029,7 @@
             sys.stdout.write(report)
     except KeyboardInterrupt:
         raise SystemExit(0)
-    except IOError as e:
+    except IOError, e:
         if 'Broken pipe' in str(e):
             # The user is probably piping to a pager like less(1) and
has exited
             # it. Just exit.
@@ -1070,7 +1070,7 @@
                     output(filename)
     except KeyboardInterrupt:
         raise SystemExit(0)
-    except IOError as e:
+    except IOError, e:
         if 'Broken pipe' in str(e):
             # The user is probably piping to a pager like less(1) and
has exited
             # it. Just exit.

cheers,

David
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: python 2.6-ism in grin

Robert Kern
On Tue, Nov 9, 2010 at 11:20 PM, David Cournapeau <[hidden email]> wrote:
> Hi,
>
> I noticed a small issue in grin preventing me from using it on python 2.5:

Thanks! Updated in SVN.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: python 2.6-ism in grin

Ilan Schnell
Funny.  I fixed exactly the same thing in Enstaller a few days ago:
https://svn.enthought.com/enthought/changeset/25987

- Ilan

On Tue, Nov 9, 2010 at 11:29 PM, Robert Kern <[hidden email]> wrote:

> On Tue, Nov 9, 2010 at 11:20 PM, David Cournapeau <[hidden email]> wrote:
>> Hi,
>>
>> I noticed a small issue in grin preventing me from using it on python 2.5:
>
> Thanks! Updated in SVN.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>   -- Umberto Eco
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev