From 25cda4841577974b2529a8b36a3896ea8f8f7283 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Fri, 3 Nov 2006 23:44:51 +0000 Subject: [PATCH] - raise the last fault if a mixed type check fails, to avoid confusing error messages --- PLC/Method.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PLC/Method.py b/PLC/Method.py index 31f365d..9d509cb 100644 --- a/PLC/Method.py +++ b/PLC/Method.py @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: Method.py,v 1.15 2006/11/02 18:32:55 mlhuang Exp $ +# $Id: Method.py,v 1.16 2006/11/03 20:36:05 thierry Exp $ # import xmlrpclib @@ -263,11 +263,7 @@ class Method: return except PLCInvalidArgument, fault: pass - xmlrpc_types = [xmlrpc_type(item) for item in expected] - raise PLCInvalidArgument("expected %s, got %s" % \ - (" or ".join(xmlrpc_types), - xmlrpc_type(type(value))), - name) + raise fault # If an authentication structure is expected, save it and # authenticate after basic type checking is done. -- 2.43.0