[apparmor] [patch] Drop unused global variables in aa.py
Christian Boltz
apparmor at cboltz.de
Thu Jan 19 22:24:13 UTC 2017
Hello,
grepping through the code shows that running_under_genprof,
unimplemented_warning, ALL, t, seen and skip are unused, so drop them.
[ 01-unused-global.diff ]
--- utils/apparmor/aa.py 2017-01-18 22:19:23.971405280 +0100
+++ utils/apparmor/aa.py 2017-01-19 23:13:17.063279610 +0100
@@ -74,8 +74,6 @@
debug_logger = DebugLogger('aa')
CONFDIR = '/etc/apparmor'
-running_under_genprof = False
-unimplemented_warning = False
# The database for severity
sev_db = None
@@ -99,12 +97,7 @@
# format: user_globs['/foo*'] = AARE('/foo*')
user_globs = {}
-# The key for representing bare "file," rules
-ALL = '\0ALL'
-
## Variables used under logprof
-### Were our
-t = hasher() # dict()
transitions = hasher()
aa = hasher() # Profiles originally in sd, replace by aa
@@ -96,12 +89,10 @@
log = []
pid = dict()
-seen = hasher() # dir()
profile_changes = hasher()
prelog = hasher()
changed = dict()
created = []
-skip = hasher()
helpers = dict() # Preserve this between passes # was our
### logprof ends
@@ -1900,7 +1891,6 @@
# set up variables for this pass
# t = hasher()
# transitions = hasher()
-# seen = hasher() # XXX global?
global log
log = []
global existing_profiles
@@ -1909,7 +1899,6 @@
# profile_changes = hasher()
# prelog = hasher()
# changed = dict()
-# skip = hasher() # XXX global?
# filelist = hasher()
aaui.UI_Info(_('Reading log entries from %s.') % logfile)
Regards,
Christian Boltz
--
Bitte sende kein "postconf -n", so wie alles es tun.
Das macht es nur unnötig einfach zu helfen.
[Patrick Ben Koetter in postfixbuch-users]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20170119/20334db6/attachment.pgp>
More information about the AppArmor
mailing list