Skip to content

Commit

Permalink
Python style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yuumasato committed Aug 17, 2021
1 parent 98843a1 commit 78664de
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion shared/templates/audit_rules_dac_modification/template.py
Expand Up @@ -10,7 +10,7 @@ def preprocess(data, lang):
elif lang == "ansible":
if "attr" in data:
# Tranform the syscall into a Ansible list
data["attr"] = [ data["attr"] ]
data["attr"] = [data["attr"]]
if "syscall_grouping" not in data:
# Ensure that syscall_grouping is a list
data["syscall_grouping"] = []
Expand Down
Expand Up @@ -10,7 +10,7 @@ def _audit_rules_file_deletion_events(data, lang):
if "name" in data:
# Tranform the syscall into a Ansible list
# The syscall is under 'name'
data["name"] = [ data["name"] ]
data["name"] = [data["name"]]
if "syscall_grouping" not in data:
# Ensure that syscall_grouping is a list
data["syscall_grouping"] = []
Expand All @@ -19,4 +19,3 @@ def _audit_rules_file_deletion_events(data, lang):

def preprocess(data, lang):
return _audit_rules_file_deletion_events(data, lang)

2 changes: 1 addition & 1 deletion shared/templates/audit_rules_path_syscall/template.py
Expand Up @@ -14,7 +14,7 @@ def preprocess(data, lang):
elif lang == "ansible":
if "syscall" in data:
# Tranform the syscall into a Ansible list
data["syscall"] = [ data["syscall"] ]
data["syscall"] = [data["syscall"]]
if "syscall_grouping" not in data:
# Ensure that syscall_grouping is a list
data["syscall_grouping"] = []
Expand Down
Expand Up @@ -10,7 +10,7 @@ def _audit_rules_unsuccessful_file_modification(data, lang):
if "name" in data:
# Tranform the syscall into a Ansible list
# The syscall is under 'name'
data["name"] = [ data["name"] ]
data["name"] = [data["name"]]
if "syscall_grouping" not in data:
# Ensure that syscall_grouping is a list
data["syscall_grouping"] = []
Expand All @@ -19,4 +19,3 @@ def _audit_rules_unsuccessful_file_modification(data, lang):

def preprocess(data, lang):
return _audit_rules_unsuccessful_file_modification(data, lang)

0 comments on commit 78664de

Please sign in to comment.