Merge branch 'quiet' into 'master'
Implement --quiet in the check and set subcommands of malcontent-client See merge request pwithnall/malcontent!13
This commit is contained in:
commit
bb36bf65c6
|
@ -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)
|
||||
|
||||
|
||||
|
@ -263,7 +265,8 @@ def command_set(user, allow_user_installation=True,
|
|||
|
||||
__set_app_filter_or_error(user_id, app_filter, interactive)
|
||||
|
||||
print('App filter for user {} set'.format(user_id))
|
||||
if not quiet:
|
||||
print('App filter for user {} set'.format(user_id))
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in New Issue