- Return None when no records match python setools.sesearch

This commit is contained in:
Dan Walsh 2010-10-14 14:32:33 -04:00
parent 764e7165c1
commit 51f161453c

View File

@ -815,7 +815,7 @@ diff -up setools-3.3.7/python/Makefile.in.python setools-3.3.7/python/Makefile.i
+.NOEXPORT: +.NOEXPORT:
diff -up setools-3.3.7/python/setools/__init__.py.python setools-3.3.7/python/setools/__init__.py 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.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 @@ @@ -0,0 +1,50 @@
+#!/usr/bin/env python +#!/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) + 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) + dict_list = filter(lambda x: dict_has_perms(x, perms), dict_list)
+ return dict_list + return dict_list
+ +