File make-4.3-capabilities-vim.diff of Package apparmor.15509

commit 60b005788e79c1be7276349242e0cc97b99f7118
Author: Christian Boltz <apparmor@cboltz.de>
Date:   Sun Mar 29 00:07:11 2020 +0100

    fix capabilities in apparmor.vim
    
    https://gitlab.com/apparmor/apparmor/-/merge_requests/461 /
    e92da079ca12e776991bd36524430bd67c1cb72a changed creating the
    capabilities to use a script.
    
    A side effect is that the list is now separated by \n instead of
    spaces. Adjust create-apparmor.vim.py to the new output.

diff --git a/utils/vim/create-apparmor.vim.py b/utils/vim/create-apparmor.vim.py
index 6a5f02a2..b5df957a 100644
--- a/utils/vim/create-apparmor.vim.py
+++ b/utils/vim/create-apparmor.vim.py
@@ -50,7 +50,7 @@ if rc != 0:
     sys.stderr.write("make list_capabilities failed: " + output)
     exit(rc)
 
-capabilities = re.sub('CAP_', '', output.strip()).lower().split(" ")
+capabilities = re.sub('CAP_', '', output.strip()).lower().split('\n')
 benign_caps = []
 for cap in capabilities:
     if cap not in danger_caps:
openSUSE Build Service is sponsored by