From 5059daf8bd59a83f520c14731173ea76ce8b8661 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sun, 8 Sep 2019 13:09:15 +0200 Subject: [PATCH] [debops-defaults] If `view` is not available, try less, etc. --- bin/debops-defaults | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/bin/debops-defaults b/bin/debops-defaults index 9dd87fe0a..3e3db4c41 100755 --- a/bin/debops-defaults +++ b/bin/debops-defaults @@ -96,13 +96,22 @@ def main(role_list): config = read_config(project_root) playbooks_path = find_playbookpath(config, project_root, required=True) - # Make sure required commands are present - require_commands('view') - - if sys.stdout.isatty(): + # Check if one of the output commands is present + sys.stdout = io.BytesIO() # suppress error message, if any + for cmd_args in (('view', '+set ft=yaml', '-'), + ('less', '-'), + ('more', '-')): + try: + require_commands(cmd_args[0]) + break + except SystemExit: + # this command was not found + cmd_args = None + sys.stdout = sys.__stdout__ + + if cmd_args and sys.stdout.isatty(): # if script is run as standalone, redirect to view - view = subprocess.Popen(['view', '+set ft=yaml', '-'], - stdin=subprocess.PIPE) + view = subprocess.Popen(cmd_args, stdin=subprocess.PIPE) try: aggregate_defaults(playbooks_path, role_list, view.stdin) except IOError as e: -- 2.21.0 >
path: root/po/packages/fr.po
AgeCommit message (Expand)Author
2022-11-04nls: Update translations....Julien Lepiller
2022-10-06nls: Update translations.Julien Lepiller
2022-09-04nls: Update translations.Julien Lepiller
2022-08-10nls: Update translations....Julien Lepiller
2022-07-09nls: Update translations....Julien Lepiller
2022-06-04nls: Update translations....Julien Lepiller
2022-05-01nls: Update translations....Julien Lepiller
2022-04-02nls: Update translations....Julien Lepiller
2022-03-01nls: Update translations....Julien Lepiller
2022-02-04nls: Update translations....Julien Lepiller
2022-01-09nls: Update translations....Julien Lepiller
2021-12-04nls: Update translations.Julien Lepiller
2021-11-06nls: Update translations....Julien Lepiller
2021-10-17nls: Update translations.Julien Lepiller
2021-09-02nls: Update translations....Julien Lepiller
2021-08-04nls: Update translations....Julien Lepiller
2021-05-10nls: Update translations.Maxim Cournoyer
2021-04-18nls: Update 'fr' translations.Julien Lepiller
2021-01-28nls: Update 'fr' translation.Julien Lepiller