Pushed under the one line rule
From 6f1b62fb1ad8c4d1639a54874462c9e7204bbf4c Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Fri, 10 Jun 2011 14:02:13 -0400
Subject: [PATCH] JSON marshalling list

Lists are sometimes marshalled as arrays.  Before, we assumed they were CSV strings.
---
 ipalib/parameters.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index acc7d29090be67f1358d3c7718e548eaa67cf30e..1551df3ffdadb5a443471d7e8993a85a4ad8d265 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -1416,7 +1416,7 @@ class List(Param):
         super(List, self).__init__(name, *rules, **kw)
 
     def normalize(self, value):
-        if value and not isinstance(value, tuple):
+        if value and not type(value) in (list, tuple):
             reader = self.__unicode_csv_reader([value])
             value = []
             for row in reader:
-- 
1.7.5.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to