[Xcb] [PATCH 2/2] c_client.py: Fix python-3 invalid except statement
Peter Harris
pharris at opentext.com
Wed Oct 10 16:41:45 PDT 2012
On 2012-10-10 19:14, Chí-Thanh Christopher Nguyễn wrote:
> -except OSError, e:
> +except OSError as e:
This breaks python 2.6 and earlier.
Stack Overflow[1] suggests that
except OSError:
_, e, _ = sys.exc_info()
is a portable version of the above. I'd like to keep supporting 2.6 for
a little while longer, if possible.
Thoughts?
Peter Harris
[1]
http://stackoverflow.com/questions/11285313/try-except-as-error-in-python-2-5-python-3-x
--
Open Text Connectivity Solutions Group
Peter Harris http://connectivity.opentext.com/
Research and Development Phone: +1 905 762 6001
pharris at opentext.com Toll Free: 1 877 359 4866
More information about the Xcb
mailing list