malcontent-client: Implement --quiet for check subcommand
When run with `--quiet`, the `check` subcommand will now print nothing. It continues to exit with an appropriate exit status. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
af44861281
commit
b14fa7b056
|
@ -216,12 +216,14 @@ def command_check(user, path, quiet=False, interactive=True):
|
|||
noun = 'Path'
|
||||
|
||||
if is_allowed:
|
||||
print('{} {} is allowed by app filter for user {}'.format(
|
||||
noun, path, user_id))
|
||||
if not quiet:
|
||||
print('{} {} is allowed by app filter for user {}'.format(
|
||||
noun, path, user_id))
|
||||
return
|
||||
else:
|
||||
print('{} {} is not allowed by app filter for user {}'.format(
|
||||
noun, path, user_id))
|
||||
if not quiet:
|
||||
print('{} {} is not allowed by app filter for user {}'.format(
|
||||
noun, path, user_id))
|
||||
raise SystemExit(EXIT_PATH_NOT_ALLOWED)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue