From 496c8681eede31e5f6fa48dd2324d32994e2e642 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 25 Oct 2006 19:33:52 +0000 Subject: [PATCH] - check lists correctly --- PLC/Method.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PLC/Method.py b/PLC/Method.py index a84f9a2..dbe1286 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.11 2006/10/19 21:38:08 tmack Exp $ +# $Id: Method.py,v 1.12 2006/10/25 14:26:08 mlhuang Exp $ # import xmlrpclib @@ -320,8 +320,10 @@ class Method: if isinstance(expected, (list, tuple)): for i in range(len(value)): if i >= len(expected): - i = len(expected) - 1 - self.type_check(name + "[]", value[i], expected[i], args) + j = len(expected) - 1 + else: + j = i + self.type_check(name + "[]", value[i], expected[j], args) # If a struct with particular (or required) types of items is # expected. -- 2.43.0