|
From: M.-A. L. <ma...@le...> - 2003-03-31 07:51:09
|
bl...@us... wrote:
> Update of /cvsroot/pywebsvcs/zsi/ZSI
> In directory sc8-pr-cvs1:/tmp/cvs-serv30132
>
> Modified Files:
> client.py
> Log Message:
> fixed programmer error. to implement a catch-all, do not pass Exception as a symbol
Catching Exception should be the same as the generic except nowadays,
since all exception classes are subclasses of this class. The only
things you don't catch are string based exceptions.
Note that a generic try:except: is almost always a bad idea,
since it also catches exceptions you don't to mask such as
KeyboardInterrupt, signal handler related exceptions, SystemExit,
etc.
> Index: client.py
> ===================================================================
> RCS file: /cvsroot/pywebsvcs/zsi/ZSI/client.py,v
> retrieving revision 1.15
> retrieving revision 1.16
> diff -u -d -r1.15 -r1.16
> --- client.py 18 Mar 2003 05:06:57 -0000 1.15
> +++ client.py 31 Mar 2003 03:45:54 -0000 1.16
> @@ -8,6 +8,8 @@
> from ZSI.auth import AUTH
> import base64, httplib, cStringIO as StringIO, types, time
>
> +import string
> +
> _b64_encode = base64.encodestring
>
> _AuthHeader = '<BasicAuth xmlns="' + ZSI_SCHEMA_URI + '''">
> @@ -260,7 +262,7 @@
> import ComplexTypes
> instance = eval('ComplexTypes.%s' % type)
> return instance.typecode.parse(data[0], self.ps)
> - except Exception:
> + except:
> return tc.parse(data[0], self.ps)
> elif hasattr(replytype, 'typecode'):
> tc = replytype.typecode
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:
> The Definitive IT and Networking Event. Be There!
> NetWorld+Interop Las Vegas 2003 -- Register today!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> _______________________________________________
> Pywebsvcs-checkins mailing list
> Pyw...@li...
> https://lists.sourceforge.net/lists/listinfo/pywebsvcs-checkins
--
Marc-Andre Lemburg
eGenix.com
Professional Python Software directly from the Source (#1, Mar 31 2003)
>>> Python/Zope Products & Consulting ... http://www.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
Python UK 2003, Oxford: 1 days left
EuroPython 2003, Charleroi, Belgium: 85 days left
|