mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-02 23:35:37 +00:00
fix whitespace and indentation in several files
This commit is contained in:
@@ -398,7 +398,7 @@ def main():
|
|||||||
|
|
||||||
# If a TTY then assume running in test mode and fix output width
|
# If a TTY then assume running in test mode and fix output width
|
||||||
if not sys.stdout.isatty():
|
if not sys.stdout.isatty():
|
||||||
parser.formatter_class=lambda prog: argparse.HelpFormatter(prog, width=80)
|
parser.formatter_class = lambda prog: argparse.HelpFormatter(prog, width=80)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
@@ -197,7 +197,7 @@ def filter_processes(processes, status):
|
|||||||
|
|
||||||
def find_apparmorfs():
|
def find_apparmorfs():
|
||||||
'''Finds AppArmor mount point'''
|
'''Finds AppArmor mount point'''
|
||||||
for p in open("/proc/mounts","rb").readlines():
|
for p in open("/proc/mounts", "rb").readlines():
|
||||||
if p.split()[2].decode() == "securityfs" and \
|
if p.split()[2].decode() == "securityfs" and \
|
||||||
os.path.exists(os.path.join(p.split()[1].decode(), "apparmor")):
|
os.path.exists(os.path.join(p.split()[1].decode(), "apparmor")):
|
||||||
return os.path.join(p.split()[1].decode(), "apparmor")
|
return os.path.join(p.split()[1].decode(), "apparmor")
|
||||||
|
@@ -140,7 +140,7 @@ class BaseRule(object):
|
|||||||
'''check if other_rule is covered by this rule object'''
|
'''check if other_rule is covered by this rule object'''
|
||||||
|
|
||||||
if not type(other_rule) == type(self):
|
if not type(other_rule) == type(self):
|
||||||
raise AppArmorBug('Passes %s instead of %s' % (str(other_rule),self.__class__.__name__))
|
raise AppArmorBug('Passes %s instead of %s' % (str(other_rule), self.__class__.__name__))
|
||||||
|
|
||||||
if check_allow_deny and self.deny != other_rule.deny:
|
if check_allow_deny and self.deny != other_rule.deny:
|
||||||
return False
|
return False
|
||||||
|
Reference in New Issue
Block a user