Skip to content
Snippets Groups Projects
Commit 4cfd169f authored by Timothee Besset's avatar Timothee Besset
Browse files

screenshot button more resilient to empty input

parent 2cdd41c3
Branches
Tags
No related merge requests found
...@@ -1521,6 +1521,10 @@ def screenshot(args): ...@@ -1521,6 +1521,10 @@ def screenshot(args):
remote_path = out_text.split('\n')[0] remote_path = out_text.split('\n')[0]
remote_filename = pathlib.PurePosixPath(remote_path).parts[-1] 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: if args.filename is None or len(args.filename) == 0:
local_path = str(pathlib.Path(args.folder, remote_filename)) local_path = str(pathlib.Path(args.folder, remote_filename))
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment