Skip to content

Commit

Permalink
Built-in policy change logs no longer printed within quotes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtesta committed Mar 14, 2024
1 parent 15078aa commit db5104e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/ssh_audit/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,11 @@ def list_builtin_policies(verbose: bool) -> Tuple[List[str], List[str]]:
client_policy_descriptions = []

for policy_name, policy in BUILTIN_POLICIES.items():
policy_description = policy_name
policy_description = ""
if verbose:
policy_description = "{:s}: {:s}".format(policy_name, policy['changelog'])
policy_description = "\"{:s}\": {:s}".format(policy_name, policy['changelog'])
else:
policy_description = "\"{:s}\"".format(policy_name)

if policy['server_policy']:
server_policy_descriptions.append(policy_description)
Expand Down
4 changes: 2 additions & 2 deletions src/ssh_audit/ssh_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,11 +802,11 @@ def list_policies(out: OutputBuffer, verbose: bool) -> None:

if len(server_policy_names) > 0:
out.head('\nServer policies:\n')
out.info(" * \"%s\"" % "\"\n * \"".join(server_policy_names))
out.info(" * %s" % "\n * ".join(server_policy_names))

if len(client_policy_names) > 0:
out.head('\nClient policies:\n')
out.info(" * \"%s\"" % "\"\n * \"".join(client_policy_names))
out.info(" * %s" % "\n * ".join(client_policy_names))

out.sep()
if len(server_policy_names) == 0 and len(client_policy_names) == 0:
Expand Down

0 comments on commit db5104e

Please sign in to comment.