From 78434b1ef079a69241365de4ddce3e9db35db5bc Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Thu, 14 Oct 2010 14:31:50 -0400 Subject: [PATCH] - Return None when no records match python setools.sesearch --- setools-python.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setools-python.patch b/setools-python.patch index 01cb56a..690cf57 100644 --- a/setools-python.patch +++ b/setools-python.patch @@ -815,7 +815,7 @@ diff -up setools-3.3.7/python/Makefile.in.python setools-3.3.7/python/Makefile.i +.NOEXPORT: diff -up setools-3.3.7/python/setools/__init__.py.python setools-3.3.7/python/setools/__init__.py --- setools-3.3.7/python/setools/__init__.py.python 2010-07-30 15:02:10.000000000 -0400 -+++ setools-3.3.7/python/setools/__init__.py 2010-08-03 15:52:27.000000000 -0400 ++++ setools-3.3.7/python/setools/__init__.py 2010-10-14 14:31:06.000000000 -0400 @@ -0,0 +1,50 @@ +#!/usr/bin/env python + @@ -854,7 +854,7 @@ diff -up setools-3.3.7/python/setools/__init__.py.python setools-3.3.7/python/se + + + dict_list = _sesearch.sesearch(info) -+ if len(perms) != 0: ++ if dict_list and len(perms) != 0: + dict_list = filter(lambda x: dict_has_perms(x, perms), dict_list) + return dict_list +