Fix checking for arguments in DNS plugins

https://fedorahosted.org/freeipa/ticket/956
This commit is contained in:
Jakub Hrozek authored and Adam Young committed 2011-02-14 10:21:27 -05:00
1 parent 76f2d2eac2
commit 284dd32040
1 file changed
+1 -1
+1 -1
View File
@@ -146,7 +146,7 @@ _record_validators = {
def has_cli_options(entry, no_option_msg):
entry = dict((t, entry.get(t, [])) for t in _record_attributes)
numattr = reduce(lambda x,y: x+y,
map(lambda x: len(x), entry.values()))
map(lambda x: len(x), [ v for v in entry.values() if v is not None ]))
if numattr == 0:
raise errors.OptionError(no_option_msg)
return entry