From ddf2990aa024d8911ce8a832870a50b4eb59d44c Mon Sep 17 00:00:00 2001
From: Pavel Zuna <pzuna@redhat.com>
Date: Mon, 23 Feb 2009 18:55:36 +0100
Subject: [PATCH] Fix multivalue params requiring default to be of type self.type instead of tuple.

---
 ipalib/parameters.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index e07808d..5bb2e4d 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -259,7 +259,10 @@ class Param(ReadOnly):
 
         # Add 'default' to self.kwargs and makes sure no unknown kw were given:
         assert type(self.type) is type
-        self.kwargs += (('default', self.type, None),)
+        if kw.get('multivalue', True):
+            self.kwargs += (('default', tuple, None),)
+        else:
+            self.kwargs += (('default', self.type, None),)
         if not set(t[0] for t in self.kwargs).issuperset(self.__kw):
             extra = set(kw) - set(t[0] for t in self.kwargs)
             raise TypeError(
-- 
1.6.0.6

