- raise the last fault if a mixed type check fails, to avoid confusing
authorMark Huang <mlhuang@cs.princeton.edu>
Fri, 3 Nov 2006 23:44:51 +0000 (23:44 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Fri, 3 Nov 2006 23:44:51 +0000 (23:44 +0000)
  error messages

PLC/Method.py

index 31f365d..9d509cb 100644 (file)
@@ -4,7 +4,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # 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.