From bb978e591b08b3388345c848fb866c22239094ac Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Mon, 20 Oct 2008 16:45:32 -0600 Subject: Fixed bug in DefaultFrom where impleied keys were using entire func_code.co_varnames instead of an approprate slice --- ipalib/frontend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipalib') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index d2985fa73..d70a725e6 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -121,7 +121,8 @@ class DefaultFrom(plugable.ReadOnly): raise TypeError('callback must be callable; got %r' % callback) self.callback = callback if len(keys) == 0: - self.keys = callback.func_code.co_varnames + fc = callback.func_code + self.keys = fc.co_varnames[:fc.co_argcount] else: self.keys = keys for key in self.keys: -- cgit