diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2014-04-23 03:42:07 -0400 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2014-04-24 19:53:41 -0400 |
commit | 29f56934d456681ab454b2c32827d1a229930609 (patch) | |
tree | aab873c16c45588cf9d67047688854cf9a203636 | |
parent | 5df8724825a913f8d4ab00f1d45ee2615012744a (diff) | |
download | meta-selinux-29f56934d456681ab454b2c32827d1a229930609.tar.gz |
policycoreutils: fix TypeError for seobject.py
Fix python error about:
File "/usr/lib64/python2.7/site-packages/seobject.py", line 109, in log
message += " sename=" + sename
TypeError: cannot concatenate 'str' and 'NoneType' objects
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r-- | recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch | 32 | ||||
-rw-r--r-- | recipes-security/selinux/policycoreutils_2.2.5.bb | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch b/recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch new file mode 100644 index 0000000..dd6ca6d --- /dev/null +++ b/recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From a66c50c0e8cd3799fc2819835b872ab62419f684 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Tue, 1 Apr 2014 02:53:36 -0400 | ||
4 | Subject: [PATCH] policycoreutils: fix TypeError for seobject.py | ||
5 | |||
6 | File "/usr/lib64/python2.7/site-packages/seobject.py", line 109, in log | ||
7 | message += " sename=" + sename | ||
8 | TypeError: cannot concatenate 'str' and 'NoneType' objects | ||
9 | |||
10 | Uptream-Status: pending | ||
11 | |||
12 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
13 | --- | ||
14 | semanage/seobject.py | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/semanage/seobject.py b/semanage/seobject.py | ||
18 | index f8d2243..66653e6 100644 | ||
19 | --- a/semanage/seobject.py | ||
20 | +++ b/semanage/seobject.py | ||
21 | @@ -105,7 +105,7 @@ except: | ||
22 | |||
23 | def log(self, msg, name = "", sename = "", serole = "", serange = "", oldsename = "", oldserole = "", oldserange = ""): | ||
24 | message = " %s name=%s" % (msg, name) | ||
25 | - if sename != "": | ||
26 | + if sename != "" and sename != None: | ||
27 | message += " sename=" + sename | ||
28 | if oldsename != "": | ||
29 | message += " oldsename=" + oldsename | ||
30 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
diff --git a/recipes-security/selinux/policycoreutils_2.2.5.bb b/recipes-security/selinux/policycoreutils_2.2.5.bb index 7c32064..560cee6 100644 --- a/recipes-security/selinux/policycoreutils_2.2.5.bb +++ b/recipes-security/selinux/policycoreutils_2.2.5.bb | |||
@@ -14,4 +14,5 @@ SRC_URI += "\ | |||
14 | file://policycoreutils-loadpolicy-symlink.patch \ | 14 | file://policycoreutils-loadpolicy-symlink.patch \ |
15 | file://policycoreutils-semanage-edit-user.patch \ | 15 | file://policycoreutils-semanage-edit-user.patch \ |
16 | file://policycoreutils-process-ValueError-for-sepolicy-seobject.patch \ | 16 | file://policycoreutils-process-ValueError-for-sepolicy-seobject.patch \ |
17 | file://policycoreutils-fix-TypeError-for-seobject.py.patch \ | ||
17 | " | 18 | " |