policycoreutils/SOURCES/0005-We-want-to-remove-the-trailing-newline-for-etc-syste.patch

27 lines
835 B
Diff
Raw Normal View History

2021-12-07 19:03:11 +00:00
From 7572bbec8b6a422e722864348a53d5e0f855e7f6 Mon Sep 17 00:00:00 2001
2021-11-04 02:35:10 +00:00
From: Miroslav Grepl <mgrepl@redhat.com>
Date: Fri, 20 Feb 2015 16:42:01 +0100
Subject: [PATCH] We want to remove the trailing newline for
/etc/system_release.
---
python/sepolicy/sepolicy/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py
2021-12-07 19:03:11 +00:00
index a2475d22547a..8055a12f6020 100644
2021-11-04 02:35:10 +00:00
--- a/python/sepolicy/sepolicy/__init__.py
+++ b/python/sepolicy/sepolicy/__init__.py
2021-12-07 19:03:11 +00:00
@@ -1228,7 +1228,7 @@ def get_os_version():
2021-11-04 02:35:10 +00:00
system_release = ""
try:
with open('/etc/system-release') as f:
- system_release = f.readline()
+ system_release = f.readline().rstrip()
except IOError:
system_release = "Misc"
--
2.32.0