From 4cfd169fb2217988dfa75b85021dcb714b8349c9 Mon Sep 17 00:00:00 2001 From: ttimo <ttimo@ttimo.net> Date: Wed, 24 May 2023 10:33:12 -0500 Subject: [PATCH] screenshot button more resilient to empty input --- client/devkit_client/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/devkit_client/__init__.py b/client/devkit_client/__init__.py index 591de35..7bdf302 100644 --- a/client/devkit_client/__init__.py +++ b/client/devkit_client/__init__.py @@ -1521,6 +1521,10 @@ def screenshot(args): remote_path = out_text.split('\n')[0] remote_filename = pathlib.PurePosixPath(remote_path).parts[-1] + if args.folder is None or len(args.folder) == 0: + logger.warning(f'Screenshot folder is not set - forcing to {os.getcwd()}') + args.folder = os.getcwd() + if args.filename is None or len(args.filename) == 0: local_path = str(pathlib.Path(args.folder, remote_filename)) else: -- GitLab