Hello,

this patch renames handle_capability() to rank_capability().

It's only used inside severity.py until now, but I plan to change that 
and want a better function name ;-)


[ 14-severity-rename-handle_capability.diff ]

=== modified file 'utils/apparmor/severity.py'
--- utils/apparmor/severity.py  2014-11-14 01:27:33 +0000
+++ utils/apparmor/severity.py  2015-05-24 12:27:11 +0000
@@ -75,7 +75,7 @@
                 else:
                     raise AppArmorException("Unexpected line in file: 
%s\n\t[Line %s]: %s" % (dbname, lineno, line))
 
-    def handle_capability(self, resource):
+    def rank_capability(self, resource):
         """Returns the severity of for the capability resource, default value 
if no match"""
         cap = resource.upper()
         if cap in self.severity['CAPABILITIES'].keys():
@@ -136,7 +136,7 @@
         elif resource[0] == '/':    # file resource
             return self.handle_file(resource, mode)
         elif resource[0:4] == 'CAP_':    # capability resource
-            return self.handle_capability(resource)
+            return self.rank_capability(resource)
         else:
             raise AppArmorException("Unexpected rank input: %s" % resource)
 




Regards,

Christian Boltz
-- 
Linux sollte Linux bleiben und nicht versuchen, ein besseres Windows zu
sein. Das ist IMHO der groesste Fehler! Warte mal noch ein oder zwei
Jahre ab, da werden dann "blue screens" unter KDE vermutlich auch zum
Alltag werden. [Thomas Hertweck in suse-linux]


-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to