From 5b9b6da341c16e39209f4f783abbc2148f24b558 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sun, 9 Jul 2023 13:00:39 -0400 Subject: [PATCH] Fixed CLIPTOOL.py adding an outdated, non-functional warning Former-commit-id: 4072bb5ec0cd7b08eecb176f809aed9145385090 Former-commit-id: 1b42beaa6d097c1c953cb91dafdc821271791467 --- port-jobs/CLIPTOOL.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/port-jobs/CLIPTOOL.py b/port-jobs/CLIPTOOL.py index fd9cf57..88c9d22 100755 --- a/port-jobs/CLIPTOOL.py +++ b/port-jobs/CLIPTOOL.py @@ -13,15 +13,15 @@ string2 = '# PORT END CLIPTOOL' if len(arguments) > 0: regex = re.compile(f"{string1}.*?{string2}", re.DOTALL) replacement = """# check for clipboard tool and display warning if missing - _display_server, _clipboard_tool, _clipboard_package = None, None, None - if 'WAYLAND_DISPLAY' in environ: - _display_server, _clipboard_tool, _clipboard_package = 'Wayland', 'wl-copy', 'wl-clipboard' - elif 'DISPLAY' in environ: - _display_server, _clipboard_tool, _clipboard_package = 'X11', 'xclip', 'xclip' - if _display_server is not None and which(_clipboard_tool) is None: - print(f'''\n\u001b[38;5;9mwarning: you are using {_display_server} and "{_clipboard_tool}" is not present - -copying entry fields will not function until "{_clipboard_package}" is installed\u001b[0m -''')""" + _display_server, _clipboard_tool, _clipboard_package = None, None, None + if 'WAYLAND_DISPLAY' in environ: + _display_server, _clipboard_tool, _clipboard_package = 'Wayland', 'wl-copy', 'wl-clipboard' + elif 'DISPLAY' in environ: + _display_server, _clipboard_tool, _clipboard_package = 'X11', 'xclip', 'xclip' + if _display_server is not None and which(_clipboard_tool) is None: + curses_radio(['okay'], f'''WARNING: you are using {_display_server} and "{_clipboard_tool}" is not present - +copying entry fields will not function until "{_clipboard_package}" is installed''' +)""" else: regex = re.compile(f"{string1}.*?{string2}\n", re.DOTALL) replacement = ''